]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Object_Size clause specifying 0 bits is illegal
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Aug 2019 09:48:57 +0000 (09:48 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Aug 2019 09:48:57 +0000 (09:48 +0000)
commita8e38e22c16c0aafceba62afa8c7ab23206760d9
treed6b32bef1abb656d0d22855f4f90e9ff53a386f3
parent6b466b3442b22ffd497407824c4b485fb89d1828
[Ada] Object_Size clause specifying 0 bits is illegal

The patch gives an error message on "for T'Object_Size use 0;".

2019-08-20  Bob Duff  <duff@adacore.com>

gcc/ada/

* sem_ch13.adb (Object_Size): Give an error for zero. It really
rubs me the wrong way that we don't honor "for T'Object_Size use
0;", but it's not important enough to fix. In any case, if we're
not going to obey the clause, we should give an error.

gcc/testsuite/

* gnat.dg/object_size1.adb: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@274722 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/sem_ch13.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/object_size1.adb [new file with mode: 0644]