This is the mail archive of the gcc-prs@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]

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
>Closed-Date:
>Last-Modified:
>Originator:     austern@apple.com
>Release:        3.3 TOT
>Organization:
>Environment:

>Description:
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.)
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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