class.c (instantiate_type): Don't just return a known type if it's wrong.
[gcc.git] / gcc / cp / typeck.c
index 80795d9be983d9c942ab3339eda4d302aa8b08fd..5009644eabbf4e72956c3689eee91952b6acc06b 100644 (file)
@@ -1474,6 +1474,9 @@ c_alignof (type)
   enum tree_code code = TREE_CODE (type);
   tree t;
 
+  if (processing_template_decl)
+    return build_min (ALIGNOF_EXPR, sizetype, type);
+
   if (code == FUNCTION_TYPE || code == METHOD_TYPE)
     return size_int (FUNCTION_BOUNDARY / BITS_PER_UNIT);