[Bug 1166105] [NEW] incorrect error message ('-Werror=edantic') with -pedantic
James Hunt
1166105 at bugs.launchpad.net
Mon Apr 8 09:45:46 UTC 2013
Public bug reported:
Specifying '-pedantic' and '-Werror' together with a file that triggers
a pedantic warning results in an incorrect message:
$ gcc -Werror foo.c
foo.c: In function ‘main’:
foo.c:21:5: erreur: ‘for’ loop initial declarations are only allowed in C99 mode
foo.c:21:5: note: use option -std=c99 or -std=gnu99 to compile your code
$ gcc -pedantic -Werror foo.c
foo.c:14:6: erreur: ISO C90 doesn’t support unnamed structs/unions [-Werror=edantic]
foo.c: In function ‘main’:
foo.c:21:5: erreur: ‘for’ loop initial declarations are only allowed in C99 mode
foo.c:21:5: note: use option -std=c99 or -std=gnu99 to compile your code
cc1: all warnings being treated as errors
$ gcc -Werror -pedantic foo.c
foo.c:14:6: erreur: ISO C90 doesn’t support unnamed structs/unions [-Werror=edantic]
foo.c: In function ‘main’:
foo.c:21:5: erreur: ‘for’ loop initial declarations are only allowed in C99 mode
foo.c:21:5: note: use option -std=c99 or -std=gnu99 to compile your code
cc1: all warnings being treated as errors
Note that '-Werror=edantic' is truncated. Presumably, it should be
showing '-Werror=pedantic'?
Note however that both '-Werror=edantic' and '-Werror=pedantic' are
(currently) invalid gcc options.
ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: gcc 4:4.7.2-1ubuntu8
ProcVersionSignature: Ubuntu 3.8.0-16.26-generic 3.8.5
Uname: Linux 3.8.0-16-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 2.9.2-0ubuntu5
Architecture: i386
Date: Mon Apr 8 10:36:45 2013
InstallationDate: Installed on 2010-10-21 (900 days ago)
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
MarkForUpload: True
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=C
SHELL=/bin/bash
SourcePackage: gcc-defaults
UpgradeStatus: Upgraded to raring on 2012-12-20 (108 days ago)
** Affects: gcc-defaults (Ubuntu)
Importance: Undecided
Status: New
** Tags: apport-bug i386 raring
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-defaults in Ubuntu.
https://bugs.launchpad.net/bugs/1166105
Title:
incorrect error message ('-Werror=edantic') with -pedantic
Status in “gcc-defaults” package in Ubuntu:
New
Bug description:
Specifying '-pedantic' and '-Werror' together with a file that
triggers a pedantic warning results in an incorrect message:
$ gcc -Werror foo.c
foo.c: In function ‘main’:
foo.c:21:5: erreur: ‘for’ loop initial declarations are only allowed in C99 mode
foo.c:21:5: note: use option -std=c99 or -std=gnu99 to compile your code
$ gcc -pedantic -Werror foo.c
foo.c:14:6: erreur: ISO C90 doesn’t support unnamed structs/unions [-Werror=edantic]
foo.c: In function ‘main’:
foo.c:21:5: erreur: ‘for’ loop initial declarations are only allowed in C99 mode
foo.c:21:5: note: use option -std=c99 or -std=gnu99 to compile your code
cc1: all warnings being treated as errors
$ gcc -Werror -pedantic foo.c
foo.c:14:6: erreur: ISO C90 doesn’t support unnamed structs/unions [-Werror=edantic]
foo.c: In function ‘main’:
foo.c:21:5: erreur: ‘for’ loop initial declarations are only allowed in C99 mode
foo.c:21:5: note: use option -std=c99 or -std=gnu99 to compile your code
cc1: all warnings being treated as errors
Note that '-Werror=edantic' is truncated. Presumably, it should be
showing '-Werror=pedantic'?
Note however that both '-Werror=edantic' and '-Werror=pedantic' are
(currently) invalid gcc options.
ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: gcc 4:4.7.2-1ubuntu8
ProcVersionSignature: Ubuntu 3.8.0-16.26-generic 3.8.5
Uname: Linux 3.8.0-16-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 2.9.2-0ubuntu5
Architecture: i386
Date: Mon Apr 8 10:36:45 2013
InstallationDate: Installed on 2010-10-21 (900 days ago)
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
MarkForUpload: True
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=C
SHELL=/bin/bash
SourcePackage: gcc-defaults
UpgradeStatus: Upgraded to raring on 2012-12-20 (108 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1166105/+subscriptions
More information about the foundations-bugs
mailing list