public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/47029] New: fixincludes: the fix for c99 inlines in the glibc header files fixes function declarations as well as function definitions
@ 2010-12-21  8:31 hkodungallur at gmail dot com
  2010-12-28 16:11 ` [Bug other/47029] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: hkodungallur at gmail dot com @ 2010-12-21  8:31 UTC (permalink / raw)
  To: gcc-bugs

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]


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-09  4:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-21  8:31 [Bug other/47029] New: fixincludes: the fix for c99 inlines in the glibc header files fixes function declarations as well as function definitions hkodungallur at gmail dot com
2010-12-28 16:11 ` [Bug other/47029] " rguenth at gcc dot gnu.org
2011-01-31 21:44 ` hkodungallur at gmail dot com
2011-01-31 21:46 ` hkodungallur at gmail dot com
2022-01-09  4:30 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).