[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: rev 8081 - trunk/subversion/libsvn_repos

From: Tobias Ringström <tobias_at_ringstrom.mine.nu>
Date: 2003-12-27 14:14:54 CET

Greg Hudson wrote:
> At any rate, there's no reason for programmers to spend any time
> thinking about uninitialized variables. The compiler will find them.
> Compilers can't be perfect about it, but gcc always errors on the side
> of warnings you inappropriately, rather than failing to warn you
> appropriately.

Unfortunately it doesn't. If you take the address of the variable
anywhere in the function, gcc's unused variable warning mechanism is
disabled:

void print(int x);
void foo(int *x);
void bar(void)
{
        int i;
        print(i);
        foo(&i);
}

~> gcc -O -Wall -W -c tmp.c
~>

(gcc 3.3.2 and others)

/Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec 27 14:15:26 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.