This is the mail archive of the gcc-patches@gcc.gnu.org mailing 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]

Re: [PATCH C/C++] Fix some diagnostics problems


On 06/09/2010 03:06 AM, Jason Merrill wrote:

+            case ICR_DEFAULT_ARGUMENT:
+              error ("cannot convert %qT to %qT in default argument",
+                 rhstype, type);
+            case ICR_ARGPASS:
+              error ("cannot convert %qT to %qT in argument passing",
+                 rhstype, type);
+              break;

These cases are unreachable, as they are covered by the previous if (fndecl) test. Either remove the if (fndecl) message and use parmnum/fndecl in these cases, or just use gcc_unreachable() in these cases.



At the test case testsuite/g++.old-deja/g++.mike/p10769b.C, the 'fndecl' is NULL, while the errtype is ICR_ARGPASS (argument passing). Is there something wrong at argument passing? With my experience, I can't figure it out. Thank you in advance if you can give me some guidance.


Thanks
Pearly


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]