[vorbis-dev] Compile problems
OmegaDan
dan at morrione.net
Thu Jan 25 13:00:25 PST 2001
I would think of this more as a feature -- instead of
propagating the error into the source code gcc catches
the problem outright. Of course the study of #if 0 is
acedemic at best :)
OD
--- Jeff Squyres <jsquyres at lsc.nd.edu> wrote:
> On Thu, 25 Jan 2001, Beni Cherniavsky wrote:
>
> > #if 0/#endif can still lead to compiler complaints
> if the comments
> > (which it doesn't recognize as such contain
> something like ubalanced
> > (uneven number of) apostrophes. The contents of
> #if 0/#endif must be
> > complete preprocessor tokens - they are only (and
> very) good for code.
>
> Forgive me for being off topic...
>
> Actually, that appears to be a gcc-ism -- and
> admittedly without checking
> the C specs -- I'd guess that it's wrong.
>
> I can compile the following program on multiple
> different native compilers
> (Solaris, IRIX) as well as KCC and pgcc (third party
> C++ compilers) and
> only gcc seems to have a problem with it:
>
> -----
> #include <stdio.h>
>
> int
> main(int argc, char* argv[])
> {
> #if 0
> This is totally bogus '
> #endif
> printf("Hello, world!\n");
> return 0;
> }
> -----
>
> gcc complains of an unterminated character constant.
> But I think it
> should apply the preprocessor *first*, and then do
> the syntactical
> analysis. All the others seem to do that.
>
> Just my $0.02.
>
> The point is moot, because:
>
> 1. Monty is fixing the real problem
> 2. There were no unterminated char/string constants
> in the code; if there
> were, you'd have larger problems anyway
>
> :-)
>
> {+} Jeff Squyres
> {+} squyres at cse.nd.edu
> {+} Perpetual Obsessive Notre Dame Student Craving
> Utter Madness
> {+} "I came to ND for 4 years and ended up staying
> for a decade"
>
>
> --- >8 ----
> List archives: http://www.xiph.org/archives/
> Ogg project homepage: http://www.xiph.org/ogg/
> To unsubscribe from this list, send a message to
> 'vorbis-dev-request at xiph.org'
> containing only the word 'unsubscribe' in the body.
> No subject is needed.
> Unsubscribe messages sent to the list will be
ignored/filtered.
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev
mailing list