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]

[Ada] Implement pragma Ada_2012 and -gnat12 switch


This patch implements pragma Ada_2012 (pragma Ada_12
allowed as a synonym) and switch -gnat12 to activate
Ada 2012 mode. Already implemented Ada_2012 features
have been placed under control of this switch. The
effect of -gnatX and pragma Extensions_Allowed (On)
has been modified to set the latest Ada version to
minimize compatibility issues. The patch also adds
-gnat2005 and -gnat2012 as synonyms for -gnat05/12.

The following compiles clean with this patch

pragma Ada_2012;
function Ada12test
  (X : Boolean) return Integer
is begin
   return (if X then 2 else 42);
end Ada12test;

Tested on x86_64-pc-linux-gnu, committed on trunk

2010-06-23  Robert Dewar  <dewar@adacore.com>

	* usage.adb: Add documentation for -gnat12 switch.
	* errout.ads: Add VMS alias entry for -gnat12 switch
	* gnat_rm.texi: Add documentation for pragma Ada_12 and Ada_2012
	Add documentation for pragma Extensions_Allowed.
	* opt.ads: Add entry for Ada 2012 mode.
	* sem_ch4.adb, par-ch3.adb, par-ch4.adb: Use new Ada 2012 mode for 2012
	features.
	* sem_prag.adb, par-prag.adb: Add processing for pragma Ada_12 and
	Ada_2012.
	* sem_ch13.adb: Add handling for Ada 2012 mode.
	* snames.ads-tmpl: Add entries for pragma Ada_2012 and Ada_12.
	* switch-c.adb: Add handling for -gnat12 switch.
	Implement -gnat2005 and -gnat2012.
	* usage.adb: Add documentation for -gnat12 switch.
	* vms_data.ads: Add /12 switch for Ada 2012 mode.

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]