Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 54418 - option "-Wmissing-prototypes" is valid for C/ObjC but not for C++
Summary: option "-Wmissing-prototypes" is valid for C/ObjC but not for C++
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High normal
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-19 06:53 UTC by Selecter
Modified: 2004-06-23 18:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Selecter 2004-06-19 06:53:24 UTC
emerge sim

/bin/sh ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/kde/3.3/include -I/usr/qt/3/include -I/usr/qt/3/include -I/usr/X11R6/include    -DPIC -fPIC -DQT_THREAD_SUPPORT  -DPIC -fPIC -DQT_THREAD_SUPPORT  -D_REENTRANT   -O2 -march=pentium4 -pipe  -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wundef -Wconversion -Wnon-virtual-dtor -Wno-long-long -g -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -O2 -march=pentium4 -pipe -fno-exceptions -fno-check-new  -c -o buffer.lo `test -f buffer.cpp || echo './'`buffer.cpp
cc1plus: warning: command line option "-Wmissing-prototypes" is valid for C/ObjC but not for C++
In file included from aboutdata.h:21,
                 from aboutdata.cpp:18:
simapi.h:1752: error: extra `;'
make[3]: *** [aboutdata.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from buffer.h:21,
                 from buffer.cpp:23:
simapi.h:1752: error: extra `;'
make[3]: *** [buffer.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/sim-0.9.2/work/sim-0.9.2/sim/api'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/sim-0.9.2/work/sim-0.9.2/sim'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sim-0.9.2/work/sim-0.9.2'
make: *** [all] Error 2

!!! ERROR: net-im/sim-0.9.2 failed.
!!! Function src_compile, Line 61, Exitcode 2
!!! (no error message)

Reproducible: Always
Steps to Reproduce:





Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.4.0, glibc-2.3.3.20040420-r0, 
2.6.7-rc3-love2) 
================================================================= 
System uname: 2.6.7-rc3-love2 i686 Intel(R) Pentium(R) 4 CPU 1.70GHz 
Gentoo Base System version 1.4.16 
Autoconf: sys-devel/autoconf-2.59-r4 
Automake: sys-devel/automake-1.8.5 
ACCEPT_KEYWORDS="x86 ~x86" 
AUTOCLEAN="yes" 
CFLAGS="-O2 -march=pentium4 -pipe" 
CHOST="i686-pc-linux-gnu" 
COMPILER="gcc3" 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-O2 -march=pentium4 -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs buildpkg" 
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ 
ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ 
http://ftp.du.se/pub/os/gentoo http://trumpetti.atm.tut.fi/gentoo/ 
http://ftp.linux.ee/pub/gentoo/distfiles/ http://ftp.heanet.ie/pub/gentoo/ 
ftp://ftp.linux.ee/pub/gentoo/distfiles/ 
http://mirror.switch.ch/mirror/gentoo/ 
http://ftp.snt.utwente.nl/pub/os/linux/gentoo 
http://ftp.iasi.roedu.net/mirrors/gentoo.org/ 
http://ds.thn.htu.se/linux/gentoo http://gentoo.tiscali.nl/gentoo/ 
http://ftp.easynet.nl/mirror/gentoo/ http://gentoo.blueyonder.co.uk 
http://mirror.gentoo.no/" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="X acpi alsa apache2 arts avi crypt cups debug encode gdbm gif gpm gtk 
gtk2 gtkhtml imlib jpeg kde libg++ libwww linguas_ru mad mikmod mmx motif 
mozilla mpeg ncurses nls nptl oggvorbis opengl pam pdflib perl png ppds python 
qt quicktime readline sdl slang spell sse ssl svga tcpd truetype unicode x86 
xml xml2 xmms xv zlib"
Comment 1 Stephen Bennett (RETIRED) gentoo-dev 2004-06-19 08:47:20 UTC
Quick workaround: add 

sed -i 's:-Werror::' ${S}/aclocal.m4 ${S}/acinclude.m4 ${S}/admin/acinclude.m4.in

to src_compile function, just before 'make -f admin/Makefile.common'.

That ought to make those warnings non-fatal. The other option would be 

sed -i 's:-Wmissing-prototypes::' ${S}/aclocal.m4 ${S}/acinclude.m4 ${S}/admin/acinclude.m4.in ${S}/configure

to remove the -Wmissing-prototypes.

Note: neither of these is tested properly, since I don't have Qt installed to build it against.
Comment 2 Selecter 2004-06-19 11:09:48 UTC
Now I get this:
/bin/sh ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/kde/3.3/include -I/usr/qt/3/include -I/usr/qt/3/include -I/usr/X11R6/include    -DPIC -fPIC -DQT_THREAD_SUPPORT  -DPIC -fPIC -DQT_THREAD_SUPPORT  -D_REENTRANT   -I/usr/include/libxml2 -I/usr/include/libxml2  -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wundef -Wconversion -Wnon-virtual-dtor -Wno-long-long -g -Wall -pedantic -W -Wpointer-arith -Wwrite-strings -O2 -march=pentium4 -pipe -fno-exceptions -fno-check-new  -c -o buffer.lo `test -f buffer.cpp || echo './'`buffer.cpp
In file included from aboutdata.h:21,
                 from aboutdata.cpp:18:
simapi.h:1806: error: extra `;'
make[3]: *** [aboutdata.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from buffer.h:21,
                 from buffer.cpp:23:
simapi.h:1806: error: extra `;'
make[3]: *** [buffer.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/sim-0.9.3-r2/work/sim-0.9.3/sim/api'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/sim-0.9.3-r2/work/sim-0.9.3/sim'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sim-0.9.3-r2/work/sim-0.9.3'
make: *** [all] Error 2

!!! ERROR: net-im/sim-0.9.3-r2 failed.
!!! Function src_compile, Line 39, Exitcode 2
!!! (no error message)
Comment 3 SpanKY gentoo-dev 2004-06-23 18:29:17 UTC
actually, the error you first reported is the same as the last ... you just have less warnings the second time around :p

the missing prototype stuff is not fatal, however having a label without a following ; in gcc-3.4.0 is:

simapi.h:1806: error: extra `;'

this has been fixed in 0.9.3 and aliz has made that stable so i'm closing this