Article View: gnu.misc.discuss
Article #63022-Wall less strict for g++ than for gcc
From: Benjamin Denckla
Date: Sat, 25 Mar 1995 19:06
Date: Sat, 25 Mar 1995 19:06
39 lines
1957 bytes
1957 bytes
Since the GNU project doesn't consider man pages important, the man page
doesn't tell how to report bugs, and it's not immediately apparent how to
get the official "Info" style documentation viewed (probably in some
emacs mode, but I can't spare the time to mess with this). So I'm
posting it here and my apologies if this is the wrong thing to do.
Using gcc 2.5.8 for HP-UX or Solaris, the following program:
#include <stdio.h>
int f( int input )
{
input += input / 2;
}
int main( int argc, char *argv[] )
{
int i = 0;
printf( "%f\n", i );
}
produces the following very helpful warnings:
test.c: In function `f':
test.c:6: warning: control reaches end of non-void function
test.c: In function `main':
test.c:12: warning: double format, different type arg (arg 2)
test.c:13: warning: control reaches end of non-void function
yet g++, which supposedly invokes gcc anyway, gives no warning.
I am very troubled by this. Does it mean that 1) the Harvard sysadmins
have an outdated, buggin version of the software 2) the Harvard sysadmins
have not set up g++ to pass on parameters like -Wall to gcc or 3) (this
one seems unlikely) there is a bug in the software?
Ben Denckla
Technical Details
Message-ID:
<3l1pjb$bu@decaxp.harvard.edu>Path:
arc1-ca.pugleaf.net!nntp.gmd.de!dearn!blekul11!ccsdec1.ufsia.ac.be!reks.uia.ac.be!idefix.CS.kuleuven.ac.be! Belgium.EU.net!EU.net!howland.reston.ans.net!news2.near.net!das-news2.harvard.edu!fas-news.harvard.edu!course3.harvard.edu!bdencklaShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1025b4,803639122f8d6ed1,start X-Google-Attributes: gid1025b4,public X-Google-ArrivalTime: 1995-03-25 21:51:10 PST Path: arc1-ca.pugleaf.net!nntp.gmd.de!dearn!blekul11!ccsdec1.ufsia.ac.be!reks.uia.ac.be!idefix.CS.kuleuven.ac.be! Belgium.EU.net!EU.net!howland.reston.ans.net!news2.near.net!das-news2.harvard.edu!fas-news.harvard.edu!course3.harvard.edu!bdenckla From: bdenckla@course3.harvard.edu (Benjamin Denckla) Newsgroups: gnu.misc.discuss Subject: -Wall less strict for g++ than for gcc Date: 25 Mar 1995 19:06:19 GMT Organization: Harvard University, Cambridge, Massachusetts Lines: 39 Message-ID: <3l1pjb$bu@decaxp.harvard.edu> NNTP-Posting-Host: course3.harvard.edu