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++] use explicit locations for some warnings in c-pragma.c


On Mon, May 25, 2015 at 06:06:01PM +0200, Manuel López-Ibáñez wrote:
>    if (token != CPP_NAME)
> -    GCC_BAD ("missing [error|warning|ignored] after %<#pragma GCC diagnostic%>");
> +    {
> +      warning_at (loc, OPT_Wpragmas,
> +		  "missing [error|warning|ignored|push|pop] after %<#pragma GCC diagnostic%>");

Line too long.

> -    GCC_BAD ("expected [error|warning|ignored|push|pop] after %<#pragma GCC diagnostic%>");
> +    {
> +      warning_at (loc, OPT_Wpragmas,
> +		  "expected [error|warning|ignored|push|pop] after %<#pragma GCC diagnostic%>");

Likewise.

Perhaps we should introduce GCC_BAD_LOC with a location_t argument and use it
here.

	Marek


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