This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/5000: volatile asm code fails in template class member functions
- From: sethml at ofb dot net
- To: rodrigc at gcc dot gnu dot org
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org,nobody at gcc dot gnu dot org, sethml at ofb dot net
- Date: Mon, 03 Dec 2001 21:29:57 -0800
- Subject: Re: c++/5000: volatile asm code fails in template class member functions
> Synopsis: volatile asm code fails in template class member functions
>
> State-Changed-From-To: open->analyzed
> State-Changed-By: rodrigc
> State-Changed-When: Mon Dec 3 17:17:36 2001
> State-Changed-Why:
> Compiling your testcase with gcc 3.0 yielded the following
> compilation error:
>
> b.cc: In function `int main()':
> b.cc:5: invalid `asm': operand number missing after %-letter
> b.cc:5: invalid `asm': operand number missing after %-letter
>
> If I changed the __asm__ line in your code to:
>
> __asm__ __volatile__ ("movl %%eax,%%eax");
>
> Then it compiled without problem.
And then if you try to compile it on gcc 2.95, it will fail to
compile. See bug report c++/4999.
Seth