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

--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Georg-Johann Lay from comment #4)
> I would already be happy if the AVR backend could diagnose situation where
> C++ magic shreds assumptions of const + PROGMEM.

That would be good.

> In order to make clear what the user *really needs* (something that's
> *really* const so it could reside in flash) and to show the problem on x86,
> I switched from const to constexpr -- however I am not a C++ guy...

This makes sense to me; declaring a variable constexpr requires constant
initialization.  The problem with the testcase is burying the declaration in a
statement-expression.

> To make things even worse, all the PROGMEM + inline asm +
> statement-expression stuff is hidden behind common usability macros that are
> used by actually every avr-g++ user like Arduino.

Hmm.  Which macros?

Reply via email to