[clug] Strange glibc error.

Duncan Roe dunc at optimation.com.au
Wed Jul 2 16:23:15 EST 2003

On Sat, Jun 28, 2003 at 06:59:58PM +1000, Jepri wrote:
> Proabably not worth a report.  If the gcc team wanted meaningful
> errors, I'm sure they would have added them by now.

Agree. There is no error. Preprocessor directives are allowed mid-statement:
I've used that myself.

After preprocessing, the compiler saw

<crap> typedef ...

It parses the token "typedef" and realises it's a reserved word out of context
so flags an error.

Paul, you could verify this by doing a "gcc -E <your source> | less".

I would expect you'll see "ma" (or whatever that unintentional stuff was), then
a number of blank lines (which were preprocessor directives) then a line
starting "typedef".

"gcc -E" or "gcc -E -C" (to preserve comments) is a good way to track down a
problem like you had. I would have replied in that vein earlier except I've been
off the air for a few days :(

Cheers ... Duncan.
> On 2003.06.28 17:52, Paul Warren wrote:
> > heh,
> > The problem was some random text, outside a comment.  Too much
> > coffee/not enough sleep for me I think.  But this stuff is so much
> > fun!
> >
> > First Line:
> > ma/* Paul Warren : u3292467 : thu10-12 */
> > ^^  <- that bit.
> >
> > not caught by the parser.  Still strange, worth a bug report?
> >
> > I removed the 'ma' and all was fine!
> > --
> > Paul Warren
> > u3292467 at student dot anu dot edu dot au
> > www.geocities.com/qvack_82/

More information about the linux mailing list