Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


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

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

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
yuray@keeper:~/build$ cat t.c

extern int puts(const char *);
int main(int argc, char *argv[])
        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
ignoring nonexistent directory "/opt/gcc/include"
ignoring nonexistent directory
ignoring nonexistent directory "/opt/gcc/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
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
t.c:1: warning: redundant redeclaration of 'puts'
-V -Qy -o /tmp/ccauVgkT.o /tmp/ccAIPPox.s
GNU assembler version (i686-pc-linux-gnu) using BFD
version 20031029
--eh-frame-hdr -m elf_i386 -dynamic-linker /lib/
/usr/lib/crt1.o /usr/lib/crti.o
/tmp/ccauVgkT.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh
t.c:1: warning: redundant redeclaration of 'puts'
Why this warning was emited ?

Anybody know, how remove this ?

Yuri Kozlov


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 > Forums > Linux Forums > Linux - Software

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

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