[Bug 619934] Re: gcc fails to compile completely valid code with -Wall -Werror
Matthias Klose
doko at ubuntu.com
Wed Jun 11 13:14:16 UTC 2014
** Bug watch added: GCC Bugzilla #61476
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61476
** Also affects: gcc via
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61476
Importance: Unknown
Status: Unknown
** Changed in: gcc-defaults (Ubuntu)
Importance: Undecided => Low
** Changed in: gcc-defaults (Ubuntu)
Status: New => Confirmed
--
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/619934
Title:
gcc fails to compile completely valid code with -Wall -Werror
Status in The GNU Compiler Collection:
Unknown
Status in “gcc-defaults” package in Ubuntu:
Confirmed
Bug description:
Binary package hint: gcc
The symptom:
cc1: warnings being treated as errors
relp_listener.c: In function ‘relp_listener_real_run’:
relp_listener.c:64: error: too many arguments for format
make: *** [relp_listener.o] Error 1
The code:
fprintf(stderr, "error: failed to create socket (%d): %m", errno,
errno);
The problem here seems to be that gcc fails to see %m as a format
specifier, and throws a warning because of -Wall. However, if the
code in question is being compiled with -Werror as well, then this
warning is treated as an error and therefore the compilation is
aborted, resulting in no build.
I don't have the ability to determine if this is a problem that
affects upstream GCC or not, but it's at least present in Ubuntu
10.04.1 LTS, and being a long term support release, something like
this should probably be fixed so that people can build their code
without working around the issue by disabling -Wall or -Werror.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: gcc 4:4.4.3-1ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-24.39-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-24-generic x86_64
Architecture: amd64
Date: Wed Aug 18 11:46:42 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
PATH=(custom, user)
LANG=en_US.utf8
SHELL=/bin/zsh
SourcePackage: gcc-defaults
To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/619934/+subscriptions
More information about the foundations-bugs
mailing list