This is the mail archive of the gcc-bugs@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]

[Bug ada/63675] New: Non-confirming aspect doesnât fail


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63675

            Bug ID: 63675
           Summary: Non-confirming aspect doesnât fail
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: simon at pushface dot org

Created attachment 33840
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33840&action=edit
Reproducer

This arises from checking the status of PR/56196 (which is, itself, now fixed).

There is an untagged base type with aspects Unchecked_Union and C_Pass_By_Copy,
a primitive subprogram of the base type, and three derived types.

All derived types result in warnings

union.ads:15:06: warning: variant record has no direct equivalent in C
union.ads:15:06: warning: use of convention for type "Derived_1" is dubious
union.ads:15:06: warning: variant record has no direct equivalent in C
union.ads:15:06: warning: use of convention for type "Derived_2" is dubious
union.ads:15:06: warning: variant record has no direct equivalent in C
union.ads:15:06: warning: use of convention for type "Derived_3" is dubious

which (a) shouldnât be a problem, I think, and (b) are on the line at which the
base type is declared, rather than on the line where the âdubiousâ derived type
is declared.

The first derived type has no aspects.

The second derived type has aspect Unchecked_Union => False, which conflicts
with that of the base type, and *is not rejected*.

The third derived type has aspect Unchecked_Union => True, which confirms that
of the base type, and *is* rejected.

union.ads:29:36: representation item appears too late
union.ads:29:36: primitive operations already defined for "Base"

I think both of derived types with aspects should be rejected.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]