This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36408] [4.3/4.4 regression] ICE with statement expression in template
- From: "dgregor at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Aug 2008 14:05:45 -0000
- Subject: [Bug c++/36408] [4.3/4.4 regression] ICE with statement expression in template
- References: <bug-36408-1771@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from dgregor at gcc dot gnu dot org 2008-08-01 14:05 -------
(In reply to comment #9)
> > - the error message we give in this case is pretty poor. Here we have an
> >empty initializer, but the error message we get back is "void value not ignored
> >as it ought to be", which really doesn't tell us much of anything about the
> >problem.
>
> I agree. Though I think addressing that should be best done in another bug
> that we can open straight away when we close this one, if you agree.
Agreed.
> > - since the statement-expression is obviously empty, can we produce this
> >error message at template definition time, rather than waiting until
> >instantiation time? (If the answer isn't a quick "yes", don't worry about it;
> >I'll eventually be going through the initialization bits to check more of them
> >at template definition time anyway.)
>
> Yes, that would be handy. Though here again, I think we should be opening
> another bug to track that.
It's probably not worth opening a bug report for this, unless it's some
placeholder bug that says, "we should diagnose as many errors as template
definition time as possible." Such a bug is almost impossible to close :)
Your updated patch looks good, but I can't approve it. I suggesting pinging
Jason to get approval.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36408