AdaCore / Ada_Drivers_Library

Ada source code and complete sample GNAT projects for selected bare-board platforms supported by GNAT.
BSD 3-Clause "New" or "Revised" License
236 stars 141 forks source link

Compiler crash with pragma Ada_2022 on body #428

Open simonjwright opened 4 months ago

simonjwright commented 4 months ago

GCC PR 114127 refers.

Using GCC 14.0.1 prerelease, building for STM32F4291, we get a bug box in framebuffer_ili9341.ads because ili9341-device.adb has pragma Ada_2022.

Putting the pragma in the spec (ili9341-device.ads) doesn’t help. Building with -gnat2022 does.

simonjwright commented 4 months ago

But -gnat2022 triggers other warnings-treated-as-errors, specifically the treatment of aggregates in parens as obsolescent -- see PR 104751 -- this issue shows why why I think that is a decision that AdaCore should not have made without consultation.

pat-rogers commented 3 months ago

I agree that treating them as obsolescent is intrusive but that's not going to change. I disable those warnings (-gnatwJ) in all my project files now. Consequently I suggest we just use the compiler switch (ie -gnat2022) rather than the pragma.