This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/47029] New: fixincludes: the fix for c99 inlines in the glibc header files fixes function declarations as well as function definitions
- From: "hkodungallur at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 21 Dec 2010 08:31:10 +0000
- Subject: [Bug other/47029] New: fixincludes: the fix for c99 inlines in the glibc header files fixes function declarations as well as function definitions
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47029
Summary: fixincludes: the fix for c99 inlines in the glibc
header files fixes function declarations as well as
function definitions
Product: gcc
Version: 4.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hkodungallur@gmail.com
I am building gcc version 4.4.2 on centos 32-bit machine.
# uname -a
Linux rh55-i386 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44 EDT 2010 i686 i686
i386 GNU/Linux
The build is successful. But my project fails to build using this built gcc.
The error (actually warning; we have -Werror set) is:
/opt/gcc-4.4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.4.2/include-fixed/sys/stat.h:317:
warning: inline function âlstat64â declared but never defined
/opt/gcc-4.4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.4.2/include-fixed/sys/stat.h:286:
warning: inline function âfstatat64â declared but never defined
/opt/gcc-4.4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.4.2/include-fixed/sys/stat.h:255:
warning: inline function âfstat64â declared but never defined
/opt/gcc-4.4.2/bin/../lib/gcc/i686-pc-linux-gnu/4.4.2/include-fixed/sys/stat.h:250:
warning: inline function âstat64â declared but never defined
The version of glibc on the system is:
# rpm -q glibc
glibc-2.5-49
It looks like fixincludes 'fixes' the function declarations as well, converting
them to extern inline. Example:
this one from <sys/stat.h>:
#ifndef __USE_FILE_OFFSET64
/* Get file attributes for FILE and put them in BUF. */
extern int stat (__const char *__restrict __file,
struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
gets converted to the following in the includes-fixed/sys/stat.h:
#ifndef __USE_FILE_OFFSET64
/* Get file attributes for FILE and put them in BUF. */
#ifdef __GNUC_GNU_INLINE__
extern
#endif
__inline__ int stat (__const char *__restrict __file,
struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
Similar thing for all the stat/lstat/fstat and stat64/lstat64/fstat64
functions.
The fixincludes should fix only the function definitions.
Although I've marked it as in Version 4.4.2, apparently this bug is present in
the latest code.
[Ref: This issue was discussed earlier today in the gcc-help list on this
thread: http://gcc.gnu.org/ml/gcc-help/2010-12/msg00197.html]