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: Command line options and pragmas


DJ Delorie wrote:

I had planned on forcing the user to place these pragmas before the
first function definition, otherwise it becomes difficult to track
when various warnings are in force.


For warnings, it is definitely useful to be able to use them on a fine grained basis in the
source. One way to get the source placement issue handled accurately is to have the
pragma make an entry in a table of source positions, then before issuing a warning
you check this table with a search to see if there is an active pragma that suppresses
warnings. That's the way we do things in GNAT for pragma Warnings On|Off.




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