Add warnings for #directives with indented #

Zack Weinberg zack@wolery.cumb.org
Sun Apr 2 12:29:00 GMT 2000


On Sun, Apr 02, 2000 at 10:44:25AM -0400, Kaveh R. Ghazi wrote:
> One more thing, bootstrapping gcc gives some of these warnings which
> I think should be avoided.

Yah, I'm testing a patch right now.

>  > include/syslimits.h:7:13: warning: the # in #include_next should not
>  >			     be at the left margin
>  > include/limits.h:117:13: warning: the # in #include_next should not be
>  >			    at the left margin
> 
> (There are a lot of these in stage2.)
> Why isn't gcc/include being treated as a [system] include dir in the above?

Because the system include dirs are hardwired by pathname.  It'll be
a system include dir after installation.

I could get around that with Makefile hackery (there is a command line
option to add a system include directory) but it's easier to just
stick the appropriate spaces in.

>  > ../../egcs-CVS20000401/gcc/cp/tinfo.cc:28:7: warning: the # in #pragma
>  > 					     should not be at the left margin
>  > ../../egcs-CVS20000401/gcc/cp/exception.cc:28:7: warning: the # in
>  > 						 #pragma should not be
>  >                                                   at the left margin
> 
> I think we should turn off the "traditional" warnings for G++.
> 
> So include/new and include/exception have two reasons not to be shown.:-)

Agreed.  The patch I am testing includes this change.

zw


More information about the Gcc-patches mailing list