🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2753

-W/-Wall fails to complain about no return value

#2753
From: pardo
Date: Thu, 14 Dec 1989 01:05
36 lines
1322 bytes
`gcc' 1.36
configuration: config.gcc; VAX and Sequent.

Both the `-W' and `-Wall' switches fail to complain when a function
fails to return a struct value (as opposed to a struct *).


foo.c:

typedef struct blah {
    char *x;
    char *y;
    char *z;
} blah;

    blah
give_me_a_blah()
{
    blah s;

    s.x = "a";
    s.y = "b";
    s.z = "c";
}


gcc -v -W -Wall -c foo.c
gcc version 1.36
 /uns/usr/local/lib/gcc-cpp -v -undef -D__GNUC__ -Dvax -Dunix -D__vax__ -D__unix__ -Wall foo.c /usr/tmp/cca15486.cpp
GNU CPP version 1.36
 /uns/usr/local/lib/gcc-cc1 /usr/tmp/cca15486.cpp -quiet -dumpbase foo.c -W -Wall -version -o /usr/tmp/cca15486.s
GNU C version 1.36 (vax) compiled by GNU C version 1.36.
default target switches: -munix
 as -o foo.o /usr/tmp/cca15486.s

	;-D on  ( Complaining about no complaints )  Pardo
Technical Details
Message-ID: <8912140105.AA15535@june.cs.washington.edu>
Path: arc1-ca.pugleaf.net!utzoo!telly!philmtl!uunet!bu-cs!lll-winken!brutus.cs.uiuc.edu!usc!cs.utexas.edu!tut.cis.ohio-state.edu!cs.washington.edu!pardo

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!philmtl!uunet!bu-cs!lll-winken!brutus.cs.uiuc.edu!usc!cs.utexas.edu!tut.cis.ohio-state.edu!cs.washington.edu!pardo
From: pardo@cs.washington.edu (pardo@cs.washington.edu)
Newsgroups: gnu.gcc.bug
Subject: -W/-Wall fails to complain about no return value
Message-ID: <8912140105.AA15535@june.cs.washington.edu>
Date: 14 Dec 89 01:05:42 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 36