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] relax constraint on Machine_Attribute argument type


This patch improves the implementation of the Machine_Attribute pragma
so that it accepts any type of arguments, to be checked by the
middle-end downstream.

The intent is to provide grounds for the vector_size attribute
support, to come when the GCC attribute handler gets visible for Ada,
hopefully from http://gcc.gnu.org/ml/gcc-patches/2009-06/msg01203.html.

Tested on x86_64-suse-linux. Committing to mainline.

2009-06-16  Robert Dewar  <dewar@adacore.com>
            Olivier Hainque  <hainque@adacore.com>

	* sem_prag.adb (Check_Arg_Is_Static_Expression): Allow for
	missing type.
	(Analyze_Attribute, case Machine_Attribute): Allow any type for arg 3.
	* gcc-interface/decl.c (prepend_attributes): Accept static
	expressions of any type as attribute arguments, not only string
	literals.
	* gnat_rm.texi (pragma Machine_Attribute section): Adjust to reflect
	the relaxation of the restriction on the Info argument type.

Attachment: intattr.dif
Description: Text document


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