Re: [PATCH 2/2] add support for -fdiagnostic-prefix[=prefix]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11/06/18 03:00, Luc Van Oostenryck wrote:
> When using sparse it's common to compile a file and directly
> run sparse on the same file, like it is done for the kernel.
> In this case, error messages from sparse are interspersed with
> those from the compiler. It's thus not always easy to know from
> which tools they come.
> 
> Fix this by allowing to prefix all the diagnostic messages
> by some configurable string, by default "sparse". More exactly,
> an error message that was emitted like:
> 	file.c:<line>:<col>: error: this is invalid code
> can now be emitted as:
> 	file.c:<line>:<col>: sparse: error: this is invalid code
> 
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
> ---
>  lib.c                     | 22 +++++++++++++++++++---
>  sparse.1                  |  6 ++++++
>  validation/fdiag-prefix.c | 11 +++++++++++
>  3 files changed, 36 insertions(+), 3 deletions(-)
>  create mode 100644 validation/fdiag-prefix.c

Don't you need to filter this out in cgcc, so that you don't
pass this option on to gcc? (ie, add this to the regex in the
'check_only_option' subroutine).

ATB,
Ramsay Jones
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux