This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH]: Fix 11525
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Mark Mitchell <mitchell at codesourcery dot com>
- Date: 01 Aug 2003 11:21:11 -0700
- Subject: Re: [C++ PATCH]: Fix 11525
- References: <3F2A2E99.6000001@codesourcery.com>
On Fri, 2003-08-01 at 02:10, Nathan Sidwell wrote:
> Hi,
> I've installed the attached obvious patch for 11525. We were saying that
> a dependent expression was non-constant far too early. Interestingly
> this bug only shows up for function scope static consts, not class
> scope static consts -- the linkage on the former is internal, but the
> latter external, so the latter is a valid object for a
> non-type template arg.
>
> - /* Since this name was dependent, the expression isn't
> - constant -- yet. No error is issued because it
> - might be constant when things are instantiated. */
> - if (parser->constant_expression_p)
> - parser->non_constant_expression_p = true;
I wonder why I wrote that code. I must have had a reason, but that
comment doesn't explain it. Maybe it predated the non-dependent
expression stuff and was necessary in that not-quite-parallel universe.
Anyhow, if your change passes tests it certainly makes sense.
Thanks,
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com