Mark Mitchell - Re: Fix PR c++/14622: Type mismatch in explicit template instantiation (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
- From: Mark Mitchell
- To: Simon Martin
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 11 Feb 2007 20:01:26 -0800
- Subject: Re: Fix PR c++/14622: Type mismatch in explicit template instantiation not detected
- References: <200702042229.06700.simartin@users.sourceforge.net> <45C6B6DC.9060203@codesourcery.com> <200702062236.23016.simartin@users.sourceforge.net>
Simon Martin wrote:
I apologize for not having gotten back to you about this more quickly.
Also, the error message should mention the types. For example:
error ("type %qT for explicit instantiation %qD does not match declared type %qT", TREE_TYPE (result), TREE_TYPE (decl), decl);
Ok. Just to be sure, the correct "order" is TREE_TYPE (result), decl and then TREE_TYPE (decl), right? Or should I swap the TREE_TYPEs?
Yes, you're right, of course.
What do you think about this other possibility: error ("invalid type for explicit instanciation %qD", decl); error (" expected %qT, got %qT", TREE_TYPE (result), TREE_TYPE (decl));
That's a fine idea. I slightly prefer my version, but I'd approve either. I do think a single call to error is better, and you need to spell-check "instantiation". :-)
Thanks,
-- Mark Mitchell CodeSourcery mark@codesourcery.com (650) 331-3385 x713
- Follow-Ups:
- References:
- Fix PR c++/14622: Type mismatch in explicit template instantiation not detected
* From: Simon Martin - Re: Fix PR c++/14622: Type mismatch in explicit template instantiation not detected
* From: Mark Mitchell - Re: Fix PR c++/14622: Type mismatch in explicit template instantiation not detected
* From: Simon Martin
- Fix PR c++/14622: Type mismatch in explicit template instantiation not detected
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |