This is the mail archive of the gcc-patches@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] |
This implements a new configuration pragma Ignore_Pragma (IDENTIFIER) which causes any subsequent occurrences of pragma IDENTIFIER (...) to be completely ignored. The following test program compiles as shown: 1. procedure IgnorePR is 2. begin 3. pragma Ignore_Pragma; | >>> wrong number of arguments for pragma "Ignore_Pragma" 4. pragma Ignore_Pragma ("abc"); | >>> incorrect argument for pragma "Ignore_Pragma" 5. pragma Ignore_Pragma (Import); 6. pragma Import (RUBBISH); 7. end; Here lines 3 and 4 have invalid uses of the pragma, properly flagged, but the junk pragma Import on line 6 is ignored because of the correctly used Ignore_Pragma on line 5. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-05-12 Robert Dewar <dewar@adacore.com> * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as Null statements. * namet.ads (Boolean3): Document this flag used for Ignore_Pragma. * par-prag.adb (Prag): Implement Ignore_Pragma. * sem_prag.adb: Implement Ignore_Pragma. * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
Attachment:
difs
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |