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]

c++/8076: -Wmissing-declarations is C-only, conflicts with documentation

>Number:         8076
>Category:       c++
>Synopsis:       -Wmissing-declarations is C-only, conflicts with documentation
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 27 16:46:03 PDT 2002
>Release:        3.3 TOT

The compiler documentation doesn't describe -Wmissing-declarations as a C-only option, but the compiler treats it as one:
bash-2.05$ cat foo.c
int f(int n) { return n; }
bash-2.05$ ~/root/bin/gcc -Wmissing-declarations -c foo.c
foo.c:1: warning: no previous declaration for `f'
bash-2.05$ ~/root/bin/g++ -Wmissing-declarations -c foo.c
cc1plus: warning: "-Wmissing-declarations" is valid for C/ObjC but not for C++

Either the documentation or the compiler is wrong.  Which is it?  (I suspect the documentation.)



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