This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix powerpc64 g77
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: David Edelsohn <dje at watson dot ibm dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Alan Modra <amodra at bigpond dot net dot au>
- Date: 02 Aug 2002 01:33:20 +0200
- Subject: Re: Fix powerpc64 g77
- Organization: CodeSourcery, LLC
- References: <36480000.1028240481@warlock.codesourcery.com>
Mark Mitchell <mark@codesourcery.com> writes:
| > | The whole point of using run-time conditionals is to allow the compiler
| > | to issue errors and warnings about pieces of code that we would
| > otherwise | not compile -- thereby preventing build failures for people
| > with | machines different from our own.
| >
| > Whereas I agree with the general philosohy of the run-time
| > conditionals, I don't think that in this particular case, the warning
| > is any meaningful. It is about the value of an expression in a path
| > that would never be taken.
|
| If you saw this code:
|
| if (TARGET_HAS_FOO) {
| x = 1 / 0;
| }
|
| and TARGET_HAS_FOO was 0, wouldn't you want a warning?
No. By no means.
As more and more optimizations are getting added to the compiler, we
have to be more and more careful about emitting unconditionally
warnings. A good example of typical situation was provided by Paul.
-- Gaby