On 2/3/22 09:45, Martin Liška wrote:
On 2/3/22 17:43, Martin Sebor wrote:
On 2/3/22 01:59, Martin Liška wrote:
On 2/3/22 09:24, Robin Dapp via Gcc-patches wrote:
Hi Martin,

Either this:

    error ("%<attribute(target(\"%s\"))%> is unknown", orig_p);

or this would be better:

    error ("attribute %<target(\"%s\")%> is unknown", orig_p);

The %< %> directives will render it in single quotes like keywords and
identifiers.  Using %qs would render it in double quotes like a string,
which wouldn't be quite right.

the x86 backend will print the error message in a different format using
single quotes e.g.

   bla.cc:2:5: error: attribute ‘bleh’ argument ‘target’ is unknown

That's a bug in the i386 back end:
   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90524

I don't find that better to be frank but maybe it would make sense for
us to also adopt this error message style and not use a different one?
They use %qs, though - or is there an intention to also change x86's
error messages?  I guess in general it's better to have similar error
messages across targets for the same problem.

Regards
  Robin

Hello.

I've just coincidentally fixed the issue with r12-7013-g0415470c8d6620
where I use the same error format as i386 does.

The change repeats the i386 mistake in the s360 back end.  If
the error is supposed to point out that orig_p is not a valid
argument to attribute target as I believe is the case then
the new call should be:

   error ("attribute %<target%> argument %qs is unknown", orig_p);

Martin

Yeah, fixed with g:9db03cd0caf6bbde1de302bf3509dc26ca8bff2b.

Great, thank you!

Martin


Cheers,
Martin

Reply via email to