[linux-audio-dev] [ot] [rant] gcc, you let me down one time too many

Christian Schoenebeck cuse at users.sourceforge.net
Mon Jun 6 15:19:05 UTC 2005


Es geschah am Montag 06 Juni 2005 15:17 als Clemens Ladisch schrieb:
> Tim Goetze wrote:
> > [Clemens Ladisch]
> >
> > > You mean you want to omit \n and the quotes?  That was always invalid
> > > in both C and C++.
> >
> > Makes me wonder how come it used to compile cleanly then. Now please
> > don't tell me "it's a gcc extension so it is evil"
>
> It's a gcc extension so^H^Hfor compatibility with some old Unix
> compilers that accidentally allowed it.  AFAIK it was dropped from g++
> but not gcc because those old compilers didn't know about C++ anyway.

At least in g++ 3.4 this *feature* is still present. I remember a painful asm 
debugging session where some registers went mad. The reason was I merged 
couple of individual asm template sequences and forgot to place a \n at some 
seam points and those instructions were simply ignored.

Lesson: always but a \n after asm template instructions, even or especially 
after the last asm instruction.

CU
Christian



More information about the Linux-audio-dev mailing list