This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: New gcc 4.0.0 warnings seem spurious
On 2005-04-27 15:30:39 +0200, Gabriel Dos Reis wrote:
> Vincent Lefevre <vincent+gcc@vinc17.org> writes:
>
> [...]
>
> | > > But if they are never modified, they evaluate to constants, right?
> | > >
> | > > The fact that they are not considered as constant expressions,
> | > > is it due to the fact that the environment is allowed to modify
> | > > them?
> | >
> | > It's due to what the C standard says. A const variable in C isn't a
> | > constant, it's just a read-only variable.
> |
> | 1+1 isn't a constant either
>
> It is an integer constant expression, and its evaluation yields a
> constant (see 6.6). Can you explain why you believe that is false?
I never said that it was false. Could you please read messages
before replying?
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA