This is the mail archive of the gcc@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: RFC: Named warnings


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


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