aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/cstreams.c
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2018-01-11 08:52:51 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-01-11 08:52:51 +0000
commit07733aa11e136aa6e1fa24e12e662489a9225bf2 (patch)
treebef2bd4163e1a57b20b9fa51114a96eb89d0ac2a /gcc/ada/cstreams.c
parent78cac7386e2dc48ec5adb4ff0c9a94eed958c9fc (diff)
downloadgcc-07733aa11e136aa6e1fa24e12e662489a9225bf2.zip
gcc-07733aa11e136aa6e1fa24e12e662489a9225bf2.tar.gz
gcc-07733aa11e136aa6e1fa24e12e662489a9225bf2.tar.bz2
[Ada] Warning on use of predefined operations on an actual fixed-point type
The compiler warns when a generic actual is a fixed-point type, because arithmetic operations in the instance will use the predefined operations on it, even if the type has user-defined primitive operations (unless formsl surprograms for these operations appear in the generic). This patch refines this warning to exclude the case where the formsal type is private, because in this case there can be no suspicious arithmetic operastions in the generic unit. 2018-01-11 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the formsl type corresponding to the actual fixed point type is private, because in this case there can be no suspicious arithmetic operations in the generic unless they reference a formal subprogram. Clarify warning. gcc/testsuite/ * gnat.dg/fixedpnt2.adb, gnat.dg/fixedpnt2.ads: New testcase. From-SVN: r256504
Diffstat (limited to 'gcc/ada/cstreams.c')
0 files changed, 0 insertions, 0 deletions