I have upgraded gcc from version 3.3.0 (IIRC [*]) to 4.1.2.
When compiling a C source file with the new gcc version, I am
encountering a warning where it was not produced using the old version
(the compiler invocation did not change, only the gcc version).
The warning reads:
"warning: ignoring #pragma weak somesymbol"
- Why would gcc (or the preprocesor) ignore this pragma?
- What do I need to do to make the pragma not being ignored?
- Why would 4.1.2 ignore it, but 3.3.0 let it pass?
Thanks in advance for any insight,
Erik Leunissen
--
[*] Both gcc versions came with a SuSE Linux distribution:
SuSE Linux 9.0: gcc 3.3.0 (I believe; can't check anymore, the old
installation is gone ...)
SuSE Linux 10.2: see specs below
> gcc -v
Using built-in specs.
Target: i586-suse-linux
Configured with: ../configure --enable-threads=posix --prefix=/usr
--with-local-prefix=/usr/local --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.1.2
--enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib
--with-system-zlib --enable-shared --enable-__cxa_atexit
--enable-libstdcxx-allocator=new --program-suffix=-4.1
--enable-version-specific-runtime-libs --without-system-libunwind
--with-cpu=generic --host=i586-suse-linux
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (SUSE Linux)
# end of message