PR c++/10479
	* parser.c (cp_parser_parenthesized_expression_list): Fold
	non-dependent expressions in attribute lists.
	PR c++/10479
	* g++.dg/ext/attrib16.C: New test.
From-SVN: r89135
+2004-10-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
+
+       PR c++/10479
+       * parser.c (cp_parser_parenthesized_expression_list): Fold
+       non-dependent expressions in attribute lists.
+
 2004-10-15  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/17042
 
                                         bool *non_constant_p)
 {
   tree expression_list = NULL_TREE;
+  bool fold_expr_p = is_attribute_list;
   tree identifier = NULL_TREE;
 
   /* Assume all the expressions will be constant.  */
            else
              expr = cp_parser_assignment_expression (parser);
 
+           if (fold_expr_p)
+             expr = fold_non_dependent_expr (expr);
+
             /* Add it to the list.  We add error_mark_node
                expressions to the list, so that we can still tell if
                the correct form for a parenthesized expression-list
 
+2004-10-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
+
+       PR c++/10479
+       * g++.dg/ext/attrib16.C: New test.
+
 2004-10-15  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/17042
 
--- /dev/null
+// { dg-do compile }
+// Origin: <rguenth at tat dot physik dot uni-tuebingen dot de>
+// PR c++/10479: use of non dependent expressions in attributes in templates
+
+template <int i>
+struct foo2 {
+  float bar __attribute__((aligned(__alignof__(double))));
+};