This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/50459] alignof doesn't work on plain old constant, works with expressions containing it
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 13 Apr 2014 19:27:53 +0000
- Subject: [Bug c/50459] alignof doesn't work on plain old constant, works with expressions containing it
- Auto-submitted: auto-generated
- References: <bug-50459-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50459
--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #1)
> The problem on the C side of things is that the values of the enum are
> represented by CONST_DECL nodes and check_user_alignment doesn't look
> through it. So maybe something like the following? (Tested x86_64-linux,
> no regressions.)
Note that the problem is not restricted to this attribute, it affects all
attributes taking an integral parameter.