RFC: Named warnings
Segher Boessenkool
segher@koffie.nl
Sat Jan 25 10:09:00 GMT 2003
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
More information about the Gcc
mailing list