public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* other/10138: -Wuninitialized could catch const* parameters
@ 2003-03-18 17:46 Hallvard B Furuseth
  0 siblings, 0 replies; only message in thread
From: Hallvard B Furuseth @ 2003-03-18 17:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10138
>Category:       other
>Synopsis:       -Wuninitialized could catch const* parameters
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 18 17:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Hallvard B Furuseth
>Release:        3.2
>Organization:
University of Oslo
>Environment:
System: SunOS bombur.uio.no 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-5_10
Architecture: sun4

	
host: sparc-sun-solaris2.8
build: sparc-sun-solaris2.8
target: sparc-sun-solaris2.8
configured with: ../gcc-3.2/configure --prefix=/usit/bombur/hbf --enable-threads --enable-version-specific-runtime-libs --enable-languages=c
>Description:
	A pointer to const parameter is almost always an input parameter
	to a function, so -Wuninitialized could warn if it has not been
	initialized.  (The function could cast away const on the parameter,
	but I've never seen the parameter being modified afterwards.)
>How-To-Repeat:
	gcc -Wuninitialized -O -S a.c

	int atoi(const char *);
	int foo()
	{
	    char buf[10];
	    return atoi(buf);
	}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-18 17:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-18 17:46 other/10138: -Wuninitialized could catch const* parameters Hallvard B Furuseth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).