-Wwrite-strings says make the string constant an array of const char
so that copying it to a non-const pointer will get a warning.
For C++, this is the standard behavior. */
- if (flag_const_strings && ! flag_writable_strings)
+ if (flag_const_strings)
{
tree elements
= build_type_variant (wide_flag ? wchar_type_node : char_type_node,
build_index_type (build_int_2 (nchars - 1, 0)));
TREE_CONSTANT (value) = 1;
- TREE_READONLY (value) = ! flag_writable_strings;
+ TREE_READONLY (value) = 1;
TREE_STATIC (value) = 1;
return value;
}
error ("%J'%D' defined both normally and as an alias", decl, decl);
*no_add_attrs = true;
}
- else if (decl_function_context (decl) == 0)
+
+ /* Note that the very first time we process a nested declaration,
+ decl_function_context will not be set. Indeed, *would* never
+ be set except for the DECL_INITIAL/DECL_EXTERNAL frobbery that
+ we do below. After such frobbery, pushdecl would set the context.
+ In any case, this is never what we want. */
+ else if (decl_function_context (decl) == 0 && current_function_decl == NULL)
{
tree id;
*count += 10;
break;
}
- /* Few special cases of expensive operations. This is usefull
+ /* Few special cases of expensive operations. This is useful
to avoid inlining on functions having too many of these. */
case TRUNC_DIV_EXPR:
case CEIL_DIV_EXPR: