Mail Archives: djgpp/2000/04/19/10:16:52
Alexandre Devaure <Alexandre DOT Devaure AT leroy-autom DOT com> wrote:
> template<class T, unsigned Size>
> class TValueFifo
> {
[...]
> int PutSecure(const T& Value)
> {
> asm volatile ("pushf"); <= the problem is here
> disable();
> int Error = Put(Value);
> popf();
> return Error;
> }
Compiler error message was:
> tfifo.h: In method `int TValueFifo<STaskMessage,64>::PutSecure(const
> STaskMessage &)':
> taskmgr.cpp:542: instantiated from here
> tfifo.h:35: `volatile' undeclared (first use this function)
> tfifo.h:35: (Each undeclared identifier is reported only once
> tfifo.h:35: for each function it appears in.)
> tfifo.h:35: warning: qualifier ignored on asm
[Some of the other warnings are also quite nasty, so this is
definitely not the only problem int that code...]
I've never used or seen anyone use inline assembly in C++ programs,
but even so, one of the things you should try is to replace the
keywords by their ANSI standard-blessed equivalents,
__asm__ __volatile__ ("pushf");
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -