This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/81845] const union's field doesn't interpret as const in switch/case
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 16 Aug 2017 11:00:08 +0000
- Subject: [Bug c/81845] const union's field doesn't interpret as const in switch/case
- Auto-submitted: auto-generated
- References: <bug-81845-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81845
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Aleksandr Slobodeniuk from comment #3)
> Fields of const-qualified structs and unions, that were initialized with
> const literals ARE *constant expressions*, isn't it?
No. See 6.6 p6