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] Do not set Do_Overflow_Check for modular type


This patch avoids setting Do_Overflow_Check flag for modular types. This
has no functional effect since gigi ignored the flag in this case, but
it is cleaner not to set it.

If the following is compiled with -gnato -gnatdt, the resulting output
will not contain the string Do_Overflow_Check.

with Interfaces; use Interfaces;
function testuns (x, y : unsigned_32) return unsigned_32 is
begin
    return X + Y;
end testuns;

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

2009-04-15  Robert Dewar  <dewar@adacore.com>

	* checks.adb (Enable_Overflow_Check): Do not set Do_Overflow_Check for
	modular type.

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]