[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