------- 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