gcc reports Internal Error

Zack Weinberg zack@codesourcery.com
Thu Jul 11 21:16:00 GMT 2002


On Thu, Jul 11, 2002 at 07:29:36PM -0400, Stuart MacDonald wrote:
> From: "Zack Weinberg" <zack@codesourcery.com>
> > For GCC, a much more efficient technique is to make use of the -dM
> > option.  See the manual.
> 
> I'm aware of that, but it is gcc specific. I'm looking for a general
> solution.

Most compilers have similar options.

> Also, -dM wasn't a complete answer; __FILE__ wasn't in the output
> IIRC.

Right, the macros with variable content (__FILE__, __LINE__, __DATE__,
etc) don't appear.  This is a nice short list, and all of them are
spelled out in the C standard (and the manual).

> Interesting. Perhaps this shouldn't be the case when reading stdin. It
> would be nice to compile what's available instead of waiting for a
> long time for all of the code to come through the pipe, then
> compiling. Parallelism vs serialisation.

It's done that way to simplify the lexer implementation.  Whether or
not the lexer is actually simpler is an open question; as I said, it
may well change in the future.

zw



More information about the Gcc-bugs mailing list