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] Fix PR ada/15613


Tested on i686-linux, committed on mainline.

Fix PR ada/15613
This was a missing check for a clear requirement in the RM (RM 2.8(4))
that forbids the appearence of a pragma argument without an identifier
from following an argument with an identifier. Note that contrary to
what may be implied by this rule, it is still not permissible to put
arguments in other than RM order (see also PR 10671). The following
test program:

package Test_244946 is
   procedure p;
   pragma Import (Convention => C, p); -- named parameters must be last
end Test_244946;

generates the error message:

test_244946.ads:3:36: pragma argument identifier required here (RM 2.8(4))

Note that we do not echo the language of the test program in the error
message since it tends to imply permissible reordering of arguments.

2005-06-14  Robert Dewar  <dewar@adacore.com>

	PR ada/15613

	* par-ch2.adb (Scan_Pragma_Argument): New procedure
	(P_Pragma): Implement RM 2.8(4) check for no pos args after named args

Attachment: difs.40
Description: Text document


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