OSDN Git Service

gcc/ChangeLog:
[pf3gnuchains/gcc-fork.git] / gcc / c-common.c
index d939e12..1718344 100644 (file)
@@ -427,6 +427,10 @@ int flag_threadsafe_statics = 1;
 
 int flag_pretty_templates = 1;
 
+/* Nonzero means warn about implicit declarations.  */
+
+int warn_implicit = 1;
+
 /* Maximum template instantiation depth.  This limit exists to limit the
    time it takes to notice infinite template instantiations; the default
    value of 1024 is likely to be in the next C++ standard.  */
@@ -5812,14 +5816,11 @@ c_init_attributes (void)
    identifier as an argument, so the front end shouldn't look it up.  */
 
 bool
-attribute_takes_identifier_p (const_tree attr_id)
+attribute_takes_identifier_p (tree attr_id)
 {
-  if (is_attribute_p ("mode", attr_id)
-      || is_attribute_p ("format", attr_id)
-      || is_attribute_p ("cleanup", attr_id))
-    return true;
-  else
-    return targetm.attribute_takes_identifier_p (attr_id);
+  return (is_attribute_p ("mode", attr_id)
+         || is_attribute_p ("format", attr_id)
+         || is_attribute_p ("cleanup", attr_id));
 }
 
 /* Attribute handlers common to C front ends.  */
@@ -6691,12 +6692,10 @@ handle_aligned_attribute (tree *node, tree ARG_UNUSED (name), tree args,
     }
   else if (is_type)
     {
-      if ((flags & (int) ATTR_FLAG_TYPE_IN_PLACE))
-       /* OK, modify the type in place.  */;
       /* If we have a TYPE_DECL, then copy the type, so that we
         don't accidentally modify a builtin type.  See pushdecl.  */
-      else if (decl && TREE_TYPE (decl) != error_mark_node
-              && DECL_ORIGINAL_TYPE (decl) == NULL_TREE)
+      if (decl && TREE_TYPE (decl) != error_mark_node
+         && DECL_ORIGINAL_TYPE (decl) == NULL_TREE)
        {
          tree tt = TREE_TYPE (decl);
          *type = build_variant_type_copy (*type);
@@ -6705,7 +6704,7 @@ handle_aligned_attribute (tree *node, tree ARG_UNUSED (name), tree args,
          TREE_USED (*type) = TREE_USED (decl);
          TREE_TYPE (decl) = *type;
        }
-      else
+      else if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE))
        *type = build_variant_type_copy (*type);
 
       TYPE_ALIGN (*type) = (1U << i) * BITS_PER_UNIT;