This is the mail archive of the gcc-bugs@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]

[Bug c/52116] pragma GCC diagnostic only acts on some lines


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52116

--- Comment #1 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2012-02-04 11:09:44 UTC ---
Created attachment 26572
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26572
patch to fix (2)

I am not surprised. Location information in GCC is not very precise. Have you
tested with GCC 4.7?

For 1), someone would need to look more closely at the locations recorded by
each pragma, and compare them with the locations of the diagnostic.

Fixing 2) is easier. Just check the output of the first diagnostic and only
emit the second if the output was true. Also, change the second warning() to
inform(). An untested patch attached. Feel free to take it, test it and submit
it. http://gcc.gnu.org/contribute.html


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