This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc-in-cxx branch created

"Kaveh R. GHAZI" <> writes:

> I read through your slides and I'm interested in contributing.  I didn't
> see the presentation itself so I don't know if this suggestion is
> redundant.  However I believe some work could be done (maybe even on
> mainline) to activate -Wc++-compat during bootstrap as a warning only,
> (not an error).  E.g.:
> 	#pragma GCC diagnostic warning "-Wc++-compat"
> This would help clean up some of the easy stuff and make the branch diffs
> much smaller.
> We could also extend -Wc++-compat to warn about more things, using C++
> reserved keywords like "class" in C comes to mind.

Yes, I agree that both steps would be quite useful.  There is already
some support in the gcc configure system and Makefile to do this;
search for CXX_COMPAT_WARN in gcc/  Adding
$(CXX_COMPAT_WARN) to $(GCC_WARN_CFLAGS) will make -Wc++-compat be
used when the build compiler supports it.

> Some stats, I ran a quick make including the above #pragma in system.h, I
> get 1089 new warnings.

Yes.  I am testing a mainline patch to clean up the tree codes now
(now that we've gone to 16 bits for tree codes, there is no need to
force each frontend to use a separate set of codes).

> These are mechanical and can be fixed with simple casts.  Again, IMHO
> these non-controversial patches should go straight into mainline.
> Once done we can -Werror this warning and avoid regressions.

Yes, I agree.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]