This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

[Bug c/35797] New: Compiler does not recognize faulty warnings starting with -Wno-


The gcc and g++ of trunk (svn r133789) has a problem with detecting faulty
warnings such was -Wno-this-does-not-exist.

E.g. it seems to pass on -Wno-long-double options down to, like with:
int main()
{
  return 0;
}
DOES NOT fail with gcc -c -g -Wno-long-double main.c
but DOES fail with gcc -c -g -Wno-long-double -Wstrict-prototypes main.c
main.c:2: warning: function declaration isn't a prototype
cc1: error: unrecognized command line option "-Wno-long-double"

This however works again, if -Wstrict-prototype does not trigger again:
hpcraink@pcglap12:~/C> cat main.c
int main (void)
{
  return 0;
}
hpcraink@pcglap12:~/C> gcc -c -g -Wno-long-double -Wstrict-prototypes main.c
hpcraink@pcglap12:~/C>

This triggers, e.g. in configure-scripts, that try to detect warnings such as
-Wno-long-double: Succeeding at first, they fail every test in compilation
later on.


-- 
           Summary: Compiler does not recognize faulty warnings starting
                    with -Wno-
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Keller at hlrs dot de
 GCC build triplet: i586-suse-linux-gnu
  GCC host triplet: i586-suse-linux-gnu
GCC target triplet: i586-suse-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35797


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