Commit f4e8a943 by Ville Voutilainen Committed by Jason Merrill

* c-common.c (c_common_reswords) add the alignof keyword,

	with same RID as __alignof and __alignof__

From-SVN: r151097
parent 7b5cbb57
2009-08-25 Ville Voutilainen <ville.voutilainen@gmail.com>
* c-common.c (c_common_reswords) add the alignof keyword,
with same RID as __alignof and __alignof__
2009-08-25 Anatoly Sokolov <aesok@post.ru> 2009-08-25 Anatoly Sokolov <aesok@post.ru>
* hooks.h (hook_bool_const_int_const_int_true): Declare. * hooks.h (hook_bool_const_int_const_int_true): Declare.
......
...@@ -619,6 +619,7 @@ const struct c_common_resword c_common_reswords[] = ...@@ -619,6 +619,7 @@ const struct c_common_resword c_common_reswords[] =
{ "__typeof__", RID_TYPEOF, 0 }, { "__typeof__", RID_TYPEOF, 0 },
{ "__volatile", RID_VOLATILE, 0 }, { "__volatile", RID_VOLATILE, 0 },
{ "__volatile__", RID_VOLATILE, 0 }, { "__volatile__", RID_VOLATILE, 0 },
{ "alignof", RID_ALIGNOF, D_CXXONLY | D_CXX0X | D_CXXWARN },
{ "asm", RID_ASM, D_ASM }, { "asm", RID_ASM, D_ASM },
{ "auto", RID_AUTO, 0 }, { "auto", RID_AUTO, 0 },
{ "bool", RID_BOOL, D_CXXONLY | D_CXXWARN }, { "bool", RID_BOOL, D_CXXONLY | D_CXXWARN },
......
2009-08-25 Ville Voutilainen <ville.voutilainen@gmail.com>
* g++.dg/cpp0x/alignof.C: New. Tests that the alignof
keyword works in the same manner as __alignof.
2009-08-25 Thomas Koenig <tkoenig@gcc.gnu.org> 2009-08-25 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/34670 PR libfortran/34670
......
// { dg-options "-std=c++0x" }
int main(void)
{
static_assert(alignof(int) == __alignof(int), "alignof(int) does not equal __alignof(int)");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment