Command line options and pragmas

Robert Dewar dewar@adacore.com
Mon Jan 9 19:36:00 GMT 2006


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.




More information about the Gcc mailing list