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] Warning on redundant slice.


Tested on i686-linux, committed on trunk

If a constant one-dimensional object A is declared as  Arr (Some_Subtype),
indicate that a slice of the form A(Some_Subtype) is redundant.

See gnat.dg/slice5.adb

2008-05-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_eval.adb
	(Eval_Slice): Warn when a slice whose discrete range is a subtype name
	denotes the whole array of its prefix.

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]