]> gcc.gnu.org Git - gcc.git/commit
[Ada] Reject 'Valid_Scalars on Unchecked_Union regardless of privacy
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 6 Sep 2022 18:11:35 +0000 (20:11 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 12 Sep 2022 08:16:52 +0000 (10:16 +0200)
commit0c960fef5d660b7c01264ac15d2314a146a52987
tree2b68df9fc195fc83e571658056a455d558d24a36
parentca90143868968cc364ba9d1aeff851ca4429b58a
[Ada] Reject 'Valid_Scalars on Unchecked_Union regardless of privacy

Attribute Valid_Scalars applied to prefix with an unchecked union
component causes a legitimate crash in the backend. It was already
rejected in the frontend for prefixes of a public type; now it is
rejected in the frontend regardless of the type privacy.

gcc/ada/

* sem_attr.adb (Analyze_Attribute [Valid_Scalars]): Move check for
unchecked union before checks for private and public types.
gcc/ada/sem_attr.adb
This page took 0.054205 seconds and 5 git commands to generate.