https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86377

--- Comment #8 from U.Mutlu <um at mutluit dot com> ---
If one activates -Werror then it won't build as it then treats the warnings as
error. And there are many warnings currently suppressed.
That means -Werror is deactivated by default, and IMO never activated by any of
the configure scripts.

It is possible to fix all the warnings and then use -Werror.
That means then that if there were a warning, then it wouldn't build.
But if the warnings are fixed, then it will build even with -Werror. 

I just have managed to fix all warnings in libiberty (a tedious work as one has
to start a clean-build after each fix done; but is manageable).

For C & C++ there are in total 7 such configure scripts (like libiberty)
needing such fixes:

../gcc_trunk/libiberty/configure
../gcc_trunk/fixincludes/configure
../gcc_trunk/libcpp/configure
../gcc_trunk/libdecnumber/configure
../gcc_trunk/mpfr-3.1.4/configure
../gcc_trunk/mpc-1.0.3/configure
../gcc_trunk/intl/configure

If one can use the following, then the fixes can be done easily:
  #pragma GCC diagnostic push
  #pragma GCC diagnostic warning "-Wunused-value"
  ...
  #pragma GCC diagnostic pop

But I'm not sure if that can be used if the building compiler is not gcc...
So, currently just playing with it to broaden by experience...

Reply via email to