On Mon, May 26, 2003 at 04:24:54PM +0200, Segher Boessenkool wrote: > Brian M. Carlson wrote: > >This would have (or at least should > >have) been caught, because gcc 3.3 introduced a complete incompatibility > >with older versions: creating an error when pasting together two such > >tokens. I don't know what the standard says on this issue, but at most > >it requires a diagnostic, and a warning suffices. Changing the warning > >to an error breaks *a lot* of code that otherwise works, including the > >kernel. > > The standard says this is undefined behaviour. The code never "worked", > but by pure accident produced the expected result.
The compiler is *permitted* to make demons fly out of my nose, but if it did that, I'd file a bug on it asserting that it shouldn't do that either. Saying that the code never worked is at best, pedantic, and at worst, false. The code compiled with gcc 3.2 into an ELF relocatable and fails to do so with gcc 3.3. > >If a .c file doesn't turn into a .o file, and it did with 3.2 [0], that's > >a regression, and therefore a bug. You can argue for all eternity > > Not if it isn't a valid C source file. Neither #warning nor #error are valid C syntax either. But I'm sure you'll find them in a great deal of C source files. Is it your contention that gcc should outright reject every file which does not comply with the C standard? And if so, which version of the C standard is that? If not, what criteria are we to use to determine whether to reject files which have syntax errors? > >that it's not bug, but a feature, and I'll tell you that if Debian ever > >ships any version of gcc in unstable that doesn't compile the kernel, > >that's a bug. > > ...but not necessarily a bug in the compiler. Are you trying to convince me that it is a case of sheer stupidity? I don't think that's what's happening here. -- Brian M. Carlson <[EMAIL PROTECTED]> 0x560553e7 "Let us think the unthinkable, let us do the undoable. Let us prepare to grapple with the ineffable itself, and see if we may not eff it after all." --Douglas Adams
pgp3YqAYq6Udd.pgp
Description: PGP signature