Bug 54724 - libgfortran does not respect --disable-werror
Summary: libgfortran does not respect --disable-werror
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2012-09-27 05:23 UTC by Mike Frysinger
Modified: 2014-12-09 20:24 UTC (History)
1 user (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Mike Frysinger 2012-09-27 05:23:58 UTC
the --disable-werror flag is very useful for distributions and dealing with a
myriad of build systems / versions / etc...  unfortunately, libgfortran doesnt
respect this flag.

# Add -Wall -fno-repack-arrays -fno-underscoring if we are using GCC.
if test "x$GCC" = "xyes"; then
  AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays -fno-underscoring"
Comment 1 Tobias Burnus 2012-09-28 10:12:00 UTC
Well, libgfortran only uses -Werror for the Fortran code. I think it is extremely unlikely to trigger there. (That part uses no system-specific code.)

Using -Werror for libgfortran's C code would be nice, but it fails too often. (I tried it once.) Thus, libgfortran's C code is compiled without -Werror by default - even without an explicit --disable-werror.

Thus, I think your issue is rather hypothetical and I don't think it makes sense to fix it.
Comment 2 Mike Frysinger 2012-09-28 23:20:09 UTC
i'm 50/50 on this.  if the code doesn't utilize anything beyond the local code base, and isn't compiled/processed by anything other than the local compiler, then the -Werror shouldn't be a problem.  but i noticed -Werror was being used because some flags *were* causing warnings and so the build errored out (bug 54725).  granted, this warning was valid and it's good that it broke (otherwise i might not have noticed as soon as i did), but in general, it's indeterminate warnings like that why distros want to turn off -Werror in their builds.
Comment 3 Dominique d'Humieres 2014-12-09 20:24:49 UTC
(1) I think that using --disable-werror is a very bad idea.
(2) I cannot remember a single instance of libgfortran being broken because of -Werror.

So I agree with Tobias:

> Thus, I think your issue is rather hypothetical and I don't think it makes
> sense to fix it.

Thus closing as WONTFIX.