This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH RFC: Narrowing POINTER_PLUS_EXPR can be a static initializer
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 22 Sep 2008 09:12:21 -0400
- Subject: Re: PATCH RFC: Narrowing POINTER_PLUS_EXPR can be a static initializer
- References: <m31vzzrw5a.fsf@google.com>
Ian Lance Taylor wrote:
> gcc/testsuite/ChangeLog:
> 2008-09-04 Ian Lance Taylor <iant@google.com>
>
> * g++.dg/init/const7.C: New test.
A random note: you might be able to write a test that does not depend on
looking at GIMPLE tests by having another initializer that runs earlier
(using a constructor priority) that checks to see if the value of the
variable is zero. If it's zero, it wasn't statically initialized.
FWIW,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713