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: New C parser [patch]


Andrew Pinski <pinskia@physics.uc.edu> writes:

| On Oct 25, 2004, at 8:03 PM, Zack Weinberg wrote:
| 
| >> +	  c_parser_error (parser,
| >> +			  "expected ':', ',', ';' or '__attribute__'");
| >> +	  break;
| >
| > These want %<%>ifying.  There are several other cases - I'm not going
| > to call them all out explicitly.
| 
| But I will say that we have C++ diagnostic regressions because of
| "%<%>ifying".  The reason why we have this problem is because
| c_parser_error takes a string but only does %s on it rather than passing
| it on to the diagnostic mechanism.

The calling should be 

   c_parser_error (message)

instead of

   c_parser_error ("%s", message);

-- Gaby


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