This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Named warnings
- From: Segher Boessenkool <segher at koffie dot nl>
- To: Stan Shebs <shebs at apple dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 25 Jan 2003 04:43:21 +0100
- Subject: Re: RFC: Named warnings
- References: <3E309188.1060508@apple.com>
Hi,
A few ideas:
Output the warning on the first line, and the description on the
second line, like this:
bla.c:14:3: warning: conversion-signed-unsigned
bla.c:14:3: Implicit conversion from signed to unsigned
Or, with the new flags -Wexplanation and -Wwhy:
bla.c:6:1: warning: comment-multi-line
bla.c:6:1: (-Wcomment-multi-line was enabled by -Wall)
bla.c:6:1: ==================================================
bla.c:6:1: Multi-line comment:
bla.c:6:1:
bla.c:6:1: A `//' comment line ends in a `\', which causes
bla.c:6:1: the next line to be part of that comment as well.
bla.c:6:1: This is probably not what you want.
bla.c:6:1: ==================================================
Put the warnings and explanations in separate files, maybe one per
C source file or per warning group; probably combined on install.
This eases translation as well, and allows for easy inclusion in the
manual, without lots of duplication or much synchronization effort.
Segher