From d3e0f18932563d067a7a35555d94313f1d675ce6 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Thu, 16 Mar 1995 17:24:31 -0500 Subject: [PATCH] (decl_attributes): Allow alignment for TYPE_DECLs. From-SVN: r9195 --- gcc/c-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/c-common.c b/gcc/c-common.c index 49bafc961c4..d1fdc6a6356 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -393,10 +393,12 @@ decl_attributes (decl, attributes, prefix_attributes) if (exact_log2 (align) == -1) error_with_decl (decl, "requested alignment of `%s' is not a power of 2"); + else if (TREE_CODE (decl) == TYPE_DECL) + TYPE_ALIGN (TREE_TYPE (decl)) = align; else if (TREE_CODE (decl) != VAR_DECL && TREE_CODE (decl) != FIELD_DECL) error_with_decl (decl, - "alignment specified for `%s'"); + "alignment may not be specified for `%s'"); else DECL_ALIGN (decl) = align; } -- 2.30.2