On 03/01/2014 08:13 PM, Patrick Palka wrote:
On Sat, Mar 1, 2014 at 7:53 PM, Marc Glisse <marc.gli...@inria.fr> wrote:
On Sat, 1 Mar 2014, Patrick Palka wrote:

+                     error_at (input_location,
+                               "redefinition of %q+#D with C language
linkage",
+                               x);
+                     inform (input_location,
+                             "%q+#D previously defined here", previous);


It seems strange that both the new and the old declarations are at the same
location...

Isn't input_location is a symbolic value standing for the location of
the decl argument that's being printed?

No, it typically points to the last token parsed. The reason your diagnostics have the location of the decl arguments is because of the '+' in the %q+#D format, which overrides the location given in the first argument. So you could just as well use 0 instead of input_location, or use 'error' rather than error_at.

Jason

Reply via email to