c: more precise locations for some -Wpragmas diagnostics
gcc/c-family/ChangeLog:
* c-pragma.c (GCC_BAD_AT): New macro.
(GCC_BAD2_AT): New macro.
(handle_pragma_pack): Use the location of the pertinent token when
issuing diagnostics about invalid constants/actions, and trailing
junk.
(handle_pragma_target): Likewise for non-string "GCC option".
(handle_pragma_message): Likewise for trailing junk.
gcc/testsuite/ChangeLog:
* gcc.dg/bad-pragma-locations.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>