RE: suppress warnings in source code

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

 



Hi Tibor,

> Is it possible somehow to suppress some gcc warnings regardless the -Wxxx command line options?

Yes and no.

The "no" being:  not with GCC.

The "yes" being:  you can use a program like grep to filter out the known warnings by location that you want to ignore.  (Besides grep... sed, awk, perl, python, ruby would also be suitable.  Whatever filter capable tool or scripting engine you are most familiar with.)

Use -fmessage-length=0 so the filter is a little easier to implement.

> Is there any attributes or pragmas which suppresses other warnings (like castings, initializations, etc) or warnings from a given line ?

No.  I'm not aware of anyone working on that as a GCC feature.

If you wanted, you could try your hand at implementing such a feature for GCC and submitting it for consideration.

Sincerely,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux