delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/19/10:37:59

From: "Alexandre Devaure" <Alexandre DOT Devaure AT leroy-autom DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <fAeL4.1879$_d1 DOT 3770486 AT nnrp4 DOT proxad DOT net> <8dk3aa$m6a$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <9LgL4.1906$D21 DOT 3649551 AT nnrp4 DOT proxad DOT net> <8dkfaj$rk1$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>
Subject: Re: 'volatile' undeclared from here
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Message-ID: <XljL4.1955$C91.3755056@nnrp4.proxad.net>
Date: Wed, 19 Apr 2000 14:25:59 GMT
NNTP-Posting-Host: 194.51.236.59
X-Complaints-To: abuse AT proxad DOT net
X-Trace: nnrp4.proxad.net 956154359 194.51.236.59 (Wed, 19 Apr 2000 16:25:59 CEST)
NNTP-Posting-Date: Wed, 19 Apr 2000 16:25:59 CEST
Organization: Guest of ProXad - France
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de> a écrit dans le
message : 8dkfaj$rk1$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE...
> 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");
>

I tried and the error message was the same.
Alex


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019