bayonne FTBFS with g++-4.4: wrong prototype for strchr()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bayonne (Ubuntu) |
Fix Released
|
Undecided
|
StefanPotyra | ||
eglibc (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
Binary package hint: gcc-4.4
bayonne FTBFS with g++-4.4 with this error:
sh ../libtool --tag=CXX --mode=compile x86_64-
x86_64-
sysexec.cpp: In member function 'void ost::BayonneTSe
sysexec.cpp:238: warning: format not a string literal and no format arguments
sysexec.cpp:238: warning: format not a string literal and no format arguments
sysexec.cpp: In member function 'void ost::BayonneTSe
sysexec.cpp:337: error: invalid conversion from 'const char*' to 'char*'
sysexec.cpp: In member function 'void ost::BayonneTSe
sysexec.cpp:675: warning: deprecated conversion from string constant to 'char*'
Line 337 of sysexec.cpp reads:
p = strchr(tone, '/');
And strchr() is supposed to take a const char * as its first argument, so this isn't *supposed* to be a conversion. This is apparently a regression in g++-4.4, vs. g++-4.3 which can compile the code just fine.
ProblemType: Bug
Architecture: amd64
Date: Thu Aug 13 02:52:15 2009
DistroRelease: Ubuntu 9.10
Package: g++-4.4 4.4.1-1ubuntu3
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: gcc-4.4
Uname: Linux 2.6.31-5-generic x86_64
Related branches
Changed in bayonne (Ubuntu): | |
assignee: | Steve Langasek (vorlon) → StefanPotyra (sistpoty) |
Changed in bayonne (Ubuntu): | |
status: | Triaged → Fix Committed |
this is unrelated to GCC, but is seen with glibc-2.10; see a diff of the preprocessed file (built with libc6-dev 2.9, vs built with 2.10.1)
-extern char *strchr (__const char *__s, int __c)
- throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
-extern char *strrchr (__const char *__s, int __c) inline_ _)) __attribute__ ((__gnu_inline__, __artificial__)) char *
- throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+extern "C++"
+{
+extern char *strchr (char *__s, int __c)
+ throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+extern __const char *strchr (__const char *__s, int __c)
+ throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern __inline __attribute__ ((__always_
+strchr (char *__s, int __c) throw ()
+{
+ return __builtin_strchr (__s, __c);
+}
+extern __inline __attribute__ ((__always_ inline_ _)) __attribute__ ((__gnu_inline__, __artificial__)) __const char *
+strchr (__const char *__s, int __c) throw ()
+{
+ return __builtin_strchr (__s, __c);
+}