This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
g++-4.3 alignas(const-expr) fails; workaround?
- From: Larry Evans <cppljevans at suddenlink dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 30 Mar 2007 05:08:32 -0500
- Subject: g++-4.3 alignas(const-expr) fails; workaround?
With g++-4.3-20070323, alignas(2) fails compile with
message indicating it needs a type instead of
constant expression. Is there any workaround.
For example, could I:
typedef unsigned char work_around[const-expr];
unsigned char alignas(work_around) actual_var[const-expr]
?
TIA.
-Larry