LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-03-2004, 06:41 AM   #1
yuray
Member
 
Registered: Apr 2003
Location: Russia, Khotkovo
Distribution: Debian
Posts: 146

Rep: Reputation: 15
Unhappy Strange warnings with -Wredundant-decls option (gcc-3.4.0)


Hello.
I was build gcc-3.4.0 (and try cvs snapshot later too).
But when I building kernel 2.6.4 I receive many warnings about "redundant redeclarations".
Small test
Code:
yuray@keeper:~/build$ cat t.c

extern int puts(const char *);
int main(int argc, char *argv[])
{
        puts(__VERSION__);
        return 0;
}

yuray@keeper:~/build$ LANG=C PATH=/opt/gcc3/bin:/opt/binu/bin gcc t.c -Wredundant-decls -v
Reading specs from /opt/gcc3/bin/../lib/gcc/i686-pc-linux-gnu/3.5.0/specs
Configured with: ../gcc-3.4.0/configure --prefix=/opt/gcc
--enable-languages=c,c++ --enable-shared --with-gnu-as --with-gnu-ld
--enable-long-long --without-included-gettext --enable-threads=posix
--without-boehm --with-system-zlib
Thread model: posix
gcc version 3.5.0 20040502 (experimental)
 /opt/gcc3/bin/../libexec/gcc/i686-pc-linux-gnu/3.5.0/cc1 -quiet -v
-iprefix /opt/gcc3/bin/../lib/gcc/i686-pc-linux-gnu/3.5.0/ t.c -quiet
-dumpbase t.c -mtune=pentiumpro -auxbase t -Wredundant-decls -version
-o /tmp/ccAIPPox.s
ignoring nonexistent directory
"/opt/gcc3/bin/../lib/gcc/i686-pc-linux-gnu/3.5.0/../../../../i686-pc-linux-gnu/include"
ignoring nonexistent directory "/opt/gcc/include"
ignoring nonexistent directory
"/opt/gcc/lib/gcc/i686-pc-linux-gnu/3.5.0/include"
ignoring nonexistent directory "/opt/gcc/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /opt/gcc3/bin/../lib/gcc/i686-pc-linux-gnu/3.5.0/include
 /usr/local/include
 /usr/include
End of search list.
GNU C version 3.5.0 20040502 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 2.95.4 20011002 (Debian prerelease).
GGC heuristics: --param ggc-min-expand=30 --param
ggc-min-heapsize=4096
t.c:1: warning: redundant redeclaration of 'puts'
 /opt/gcc3/bin/../lib/gcc/i686-pc-linux-gnu/3.5.0/../../../../i686-pc-linux-gnu/bin/as
-V -Qy -o /tmp/ccauVgkT.o /tmp/ccAIPPox.s
GNU assembler version 2.14.90.0.7 (i686-pc-linux-gnu) using BFD
version 2.14.90.0.7 20031029
 /opt/gcc3/bin/../libexec/gcc/i686-pc-linux-gnu/3.5.0/collect2
--eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2
/usr/lib/crt1.o /usr/lib/crti.o
/opt/gcc3/bin/../lib/gcc/i686-pc-linux-gnu/3.5.0/crtbegin.o
-L/opt/gcc3/bin/../lib/gcc/i686-pc-linux-gnu/3.5.0
-L/opt/gcc3/bin/../lib/gcc
-L/opt/gcc3/bin/../lib/gcc/i686-pc-linux-gnu/3.5.0/../../../../i686-pc-linux-gnu/lib
-L/opt/gcc3/bin/../lib/gcc/i686-pc-linux-gnu/3.5.0/../../..
/tmp/ccauVgkT.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh
/opt/gcc3/bin/../lib/gcc/i686-pc-linux-gnu/3.5.0/crtend.o
/usr/lib/crtn.o
yuray@keeper:~/build$
t.c:1: warning: redundant redeclaration of 'puts'
Why this warning was emited ?

Anybody know, how remove this ?

Thanks.
Yuri Kozlov
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc unrecognized option ruben22 Linux From Scratch 9 11-12-2008 04:41 AM
what does the option -s of gcc mean ? hongxing Linux - Software 3 11-28-2005 08:12 PM
strange locale warnings in Mandrake 10.1 Mistreated Linux - Software 1 02-09-2005 10:40 AM
gcc option -E use. niverson Programming 2 10-11-2004 04:06 PM
GCC has option for Xeon cpu ??? xudeyong Programming 1 05-22-2003 01:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration