This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/8076: -Wmissing-declarations is C-only, conflicts with documentation
- From: austern at apple dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 27 Sep 2002 23:42:48 -0000
- Subject: c++/8076: -Wmissing-declarations is C-only, conflicts with documentation
- Reply-to: austern at apple dot com
>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: