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: named warnings & individual warning control


I just had an idea for a dirty hack...

Replace the warn() function with a macro that passes the FILE/LINE it
was called from as well.  Add a pragma that lets you block messages
based on the file/line in gcc where they're generated.  Of *course*
they're going to change from release to release!  How could you even
imagine otherwise? ;-)

It also has the advantage of requiring no global source changes, and
lets you specify each individual warning.

#pragma GCC ignore-warn c-decl.c:4633

I can see this being marginally useful for debugging gcc itself, too,
since it tells you where each warning comes from.


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