https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90736
--- Comment #5 from Marek Polacek ---
Author: mpolacek
Date: Wed Jun 12 20:17:36 2019
New Revision: 272217
URL: https://gcc.gnu.org/viewcvs?rev=272217=gcc=rev
Log:
PR c++/90736 - bogus error with alignof.
* constexpr.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90736
Marek Polacek changed:
What|Removed |Added
Status|NEW |ASSIGNED
Assignee|unassigned
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90736
--- Comment #4 from Marek Polacek ---
Plain int is enough:
constexpr int fn(const int b) { return b; }
constexpr int c = fn(alignof(int));
alignas(c) char d;
We have an INTEGER_CST with const int type; that doesn't seem entirely correct.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90736
Richard Biener changed:
What|Removed |Added
Priority|P3 |P2
Known to work|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90736
--- Comment #3 from Marek Polacek ---
This compiles when the parm 'b' is not const.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90736
Marek Polacek changed:
What|Removed |Added
Keywords||rejects-valid