[multiple changes]

2014-07-18  Vincent Celier  <celier@adacore.com>

	* par-ch4.adb (Simple_Expression): Add missing style check
	for binary adding operators.
	(Term): Add missing style check for multiplying operators.

2014-07-18  Robert Dewar  <dewar@adacore.com>

	* impunit.adb: Minor comment correction.
	* widechar.adb, s-wchcon.ads: Minor comment corrections.

From-SVN: r212783
This commit is contained in:
Arnaud Charlet 2014-07-18 11:23:28 +02:00
parent baa571ab78
commit c7a7f405b3
6 changed files with 28 additions and 7 deletions

View File

@ -1,3 +1,14 @@
2014-07-18 Vincent Celier <celier@adacore.com>
* par-ch4.adb (Simple_Expression): Add missing style check
for binary adding operators.
(Term): Add missing style check for multiplying operators.
2014-07-18 Robert Dewar <dewar@adacore.com>
* impunit.adb: Minor comment correction.
* widechar.adb, s-wchcon.ads: Minor comment corrections.
2014-07-18 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb (Build_Discrete_Static_Predicate): New name

View File

@ -134,7 +134,7 @@ package body Debug is
-- d.N Add node to all entities
-- d.O Dump internal SCO tables
-- d.P Previous (non-optimized) handling of length comparisons
-- d.Q
-- d.Q Previous (incomplete) style check for binary operators
-- d.R Restrictions in ali files in positional form
-- d.S Force Optimize_Alignment (Space)
-- d.T Force Optimize_Alignment (Time)

View File

@ -382,8 +382,8 @@ package body Impunit is
("s-ststop", F), -- System.Strings.Stream_Ops
("s-tasinf", F), -- System.Task_Info
("s-unstyp", F), -- System.Unsigned_Types
("s-wchcnv", F), -- System.Wch_Cnv
("s-wchcon", F), -- System.Wch_Con
("s-wchcnv", F), -- System.WCh_Cnv
("s-wchcon", F), -- System.WCh_Con
-- The following are strictly speaking Ada 2012 units, but we are allowed
-- to add children to system, so we consider them to be implementation

View File

@ -2152,6 +2152,11 @@ package body Ch4 is
exit when Token not in Token_Class_Binary_Addop;
Tokptr := Token_Ptr;
Node2 := New_Op_Node (P_Binary_Adding_Operator, Tokptr);
if Style_Check and then not Debug_Flag_Dot_QQ then
Style.Check_Binary_Operator;
end if;
Scan; -- past operator
Set_Left_Opnd (Node2, Node1);
Node1 := P_Term;
@ -2406,6 +2411,11 @@ package body Ch4 is
exit when Token not in Token_Class_Mulop;
Tokptr := Token_Ptr;
Node2 := New_Op_Node (P_Multiplying_Operator, Tokptr);
if Style_Check and then not Debug_Flag_Dot_QQ then
Style.Check_Binary_Operator;
end if;
Scan; -- past operator
Set_Left_Opnd (Node2, Node1);
Set_Right_Opnd (Node2, P_Factor);

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@ -77,7 +77,7 @@ package System.WCh_Con is
-- 1. Define a code for a new value of type WC_Encoding_Method
-- 2. Adjust the definition of WC_Encoding_Method accordingly
-- 3. Provide appropriate conversion routines in System.Wch_Cnv
-- 3. Provide appropriate conversion routines in System.WCh_Cnv
-- 4. Adjust definition of WC_Longest_Sequence if necessary
-- 5. Add an entry in WC_Encoding_Letters for the new method
-- 6. Add proper code to s-wchstw.adb, s-wchwts.adb, s-widwch.adb

View File

@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2009 Free Software Foundation, Inc. --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@ -29,7 +29,7 @@
-- --
------------------------------------------------------------------------------
-- Note: this package uses the generic subprograms in System.Wch_Cnv, which
-- Note: this package uses the generic subprograms in System.WCh_Cnv, which
-- completely encapsulate the set of wide character encoding methods, so no
-- modifications are required when adding new encoding methods.