Indented #line directives
Zack Weinberg
weinberg@cygnus.com
Fri May 19 11:05:00 GMT 2000
On Fri, May 19, 2000 at 11:09:01AM -0700, Mark Mitchell wrote:
>
> Zack --
>
> The preprocessor is emitting `#' directives in non-zero columns.
> For example, this came out of a preprocessed source file:
>
> # 1 "/home/mitchell/dev/egcs-2/new-abi-objdir/gcc/include/limits.h" 1 3
>
> Note that the `#' is not in the leftmost column.
Known bug, but should be harmless. Will be fixed with the new lexer
(next week, I hope).
We have to force generation of linemarkers a bit too early when we
process #include, because the newline at the end of an #include line isn't
processed until _after_ the entire included file. Yes, this is wrong.
> Perhaps this is because that file contains:
>
> #ifdef _GCC_NEXT_LIMITS_H
> #include_next <limits.h> /* recurse down to the real one */
> #endif
>
> That's bogus, and I'll fix it.
That is deliberate, please leave it alone. It suppresses warnings
about #include_next being unknown to traditional C.
> Isn't the preprocessor supposed to
> reject `#' directives that don't occur in the leftmost column?
Only in traditional mode.
zw
More information about the Gcc-bugs
mailing list