🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #624

__STDC__, symout.c, <stdio.h>, fwrite

#624
From: Tim Shepard
Date: Mon, 25 Sep 1989 14:25
54 lines
3198 bytes
When I bootstrapped gcc-1.36, I got many warnings while compiling symout.c:

stage1/gcc -Bstage1/ -c -O -g   -I. -I. -I./config symout.c
symout.c: In function symout_init:
symout.c:157: warning: argument passing between incompatible pointer types
symout.c: In function symout_types:
symout.c:341: warning: argument passing between incompatible pointer types
symout.c:465: warning: argument passing between incompatible pointer types
symout.c: In function symout_array_domain:
symout.c:595: warning: argument passing between incompatible pointer types
symout.c: In function symout_range_bounds:
symout.c:608: warning: argument passing between incompatible pointer types
symout.c:614: warning: argument passing between incompatible pointer types
symout.c: In function symout_record_fields:
symout.c:639: warning: argument passing between incompatible pointer types
symout.c: In function symout_enum_values:
symout.c:658: warning: argument passing between incompatible pointer types
symout.c: In function symout_block_symbols:
symout.c:854: warning: argument passing between incompatible pointer types
symout.c: In function symout_block_tags:
symout.c:886: warning: argument passing between incompatible pointer types
symout.c: In function symout_block:
symout.c:946: warning: argument passing between incompatible pointer types
symout.c:949: warning: argument passing between incompatible pointer types
symout.c: In function symout_top_blocks:
symout.c:1058: warning: argument passing between incompatible pointer types
symout.c:1061: warning: argument passing between incompatible pointer types
symout.c:1094: warning: argument passing between incompatible pointer types
symout.c:1097: warning: argument passing between incompatible pointer types
symout.c: In function symout_source_file:
symout.c:1127: warning: argument passing between incompatible pointer types
symout.c: In function symout_sources:
symout.c:1165: warning: argument passing between incompatible pointer types
symout.c: In function symout_finish:
symout.c:1211: warning: argument passing between incompatible pointer types
symout.c:1223: warning: argument passing between incompatible pointer types


I looked at symout.c at all the lines mentioned above, and noticed
that they all had calls to fwrite().  Someone recently added ANSI
prototypes for the stdio library to our /usr/include/stdio.h (all
#ifdef'd __STDC__) and the prototype for fwrite there is:

extern int fwrite(const char*, int, int, FILE*);

The calls to fwrite in symout.c should have casts for the first
arguments.  No?  (Or is there something wrong with this prototype for
fwrite?)

Maybe the warnings above should also indicate which argument is
causing a problem.

				-Tim
Technical Details
Message-ID: <8909251425.AA08201@PTT.LCS.MIT.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!allspice.lcs.mit.edu!shep

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!allspice.lcs.mit.edu!shep
From: shep@allspice.lcs.mit.edu (Tim Shepard)
Newsgroups: gnu.gcc.bug
Subject: __STDC__, symout.c, <stdio.h>, fwrite
Message-ID: <8909251425.AA08201@PTT.LCS.MIT.EDU>
Date: 25 Sep 89 14:25:26 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 54