This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/34000] GCC pedwarns about use of static inline functions in extern inline functions



------- Comment #1 from lennox at cs dot columbia dot edu  2008-01-30 18:26 -------
The static const data problem is also PR 35017, now fixed; I'm editing the
summary accordingly.

The problem with static inline functions is not restricted to Darwin.  The
following example shows the problem on any X86 platform with SSE enabled,
because the MMX/SSE intrinsic functions in GCC's <*mmintrin.h> headers are
defined as static inline functions.

This is a regression from GCC 4.2.

$ ~/GCC/bin/gcc -msse2 -c inline-test-sse.c
inline-test-sse.c: In function ?vect_add?:
inline-test-sse.c:5: warning: ?_mm_add_epi8? is static but used in inline
function ?vect_add? which is not static

$ ~/GCC/bin/gcc -v -msse2 -c inline-test-sse.c
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.3-20080125/configure --prefix=/home/jonathan/GCC
Thread model: posix
gcc version 4.3.0 20080125 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v' '-msse2' '-c' '-mtune=generic'
 /home/jonathan/GCC/libexec/gcc/i686-pc-linux-gnu/4.3.0/cc1 -quiet -v
inline-test-sse.c -quiet -dumpbase inline-test-sse.c -msse2 -mtune=generic
-auxbase inline-test-sse -version -o /tmp/ccuQGUgc.s
ignoring nonexistent directory
"/home/jonathan/GCC/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /home/jonathan/GCC/include
 /home/jonathan/GCC/lib/gcc/i686-pc-linux-gnu/4.3.0/include
 /home/jonathan/GCC/lib/gcc/i686-pc-linux-gnu/4.3.0/include-fixed
 /usr/include
End of search list.
GNU C (GCC) version 4.3.0 20080125 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 4.3.0 20080125 (experimental), GMP version
4.2.1, MPFR version 2.2.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 531c82c665c608438f0d85483de1c151
inline-test-sse.c: In function ?vect_add?:
inline-test-sse.c:5: warning: ?_mm_add_epi8? is static but used in inline
function ?vect_add? which is not static
COLLECT_GCC_OPTIONS='-v' '-msse2' '-c' '-mtune=generic'
 as -V -Qy -o inline-test-sse.o /tmp/ccuQGUgc.s
GNU assembler version 2.17.50 (i586-suse-linux) using BFD version (GNU
Binutils) 2.17.50.20070726-14 (SUSE Linux)
COMPILER_PATH=/home/jonathan/GCC/libexec/gcc/i686-pc-linux-gnu/4.3.0/:/home/jonathan/GCC/libexec/gcc/i686-pc-linux-gnu/4.3.0/:/home/jonathan/GCC/libexec/gcc/i686-pc-linux-gnu/:/home/jonathan/GCC/lib/gcc/i686-pc-linux-gnu/4.3.0/:/home/jonathan/GCC/lib/gcc/i686-pc-linux-gnu/
LIBRARY_PATH=/home/jonathan/GCC/lib/gcc/i686-pc-linux-gnu/4.3.0/:/home/jonathan/GCC/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-msse2' '-c' '-mtune=generic'


-- 

lennox at cs dot columbia dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|GCC pedwarns about use of   |GCC pedwarns about use of
                   |static inline functions or  |static inline functions in
                   |static const data in extern |extern inline functions
                   |inline functions            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34000


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]