Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Problems with -Wall flag: msg#00015

search.snowball

Subject: Re: Problems with -Wall flag

On Tue, Feb 24, 2004 at 05:54:27PM -0700, Neal Richter wrote:
> Is this a thank you for the polite input?

I apologise if perhaps overly terse response came across as rude. That wasn't
my intention at all.

> 10 of the 14 errors reported were not machine generated.

And should obviously be corrected!

> I made no claim for coding standards for machine-generated code. In
> general, enforcing any kind of style on this type of code is silly and
> fairly hard.

Sorry, I read your message as saying these warnings were a problem for you
because of the coding standards.

> Correctness is the only real metric, and efficiency is a consideration.
>
> Note that the 'unused variable m' error at a minimum results in several
> meaningless machine instructions. Keeping track of when/if it is used is
> hard, so I have no problem if you want to ignore it.

I'd hope any decent compiler would remove such dead code (and if it can warn
about it, it must know it's dead code!) GCC does remove such code if you
enable optimisation - identical code is produced for functions foo and bar:

$ cat test.c
void foo(int a, int b) { int m = a - b; }
void bar(int a, int b) { }
$ gcc-2.95 -O -S -Wall test.c
.file "test.c"
.version "01.01"
gcc2_compiled.:
.text
.align 4
.globl foo
.type foo,@function
foo:
pushl %ebp
movl %esp,%ebp
leave
ret
.Lfe1:
.size foo,.Lfe1-foo
.align 4
.globl bar
.type bar,@function
bar:
pushl %ebp
movl %esp,%ebp
leave
ret
.Lfe2:
.size bar,.Lfe2-bar
.ident "GCC: (GNU) 2.95.4 20011002 (Debian prerelease)"

> Thanks for all your hard work on Snowball.

I'm mostly a user. Most of the hard work is done by Martin and Richard.

Cheers,
Olly


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe