#include "config.h"
#include "system.h"
#include "tree.h"
-#include "tree-inline.h"
#include "flags.h"
#include "toplev.h"
#include "output.h"
int warn_sequence_point;
+/* Nonzero means to warn about compile-time division by zero. */
+int warn_div_by_zero = 1;
+
/* The elements of `ridpointers' are identifier nodes for the reserved
type names and storage classes. It is indexed by a RID_... value. */
tree *ridpointers;
/* Information about how a function name is generated. */
struct fname_var_t
{
- tree *decl; /* pointer to the VAR_DECL. */
- unsigned rid; /* RID number for the identifier. */
- int pretty; /* How pretty is it? */
+ tree *const decl; /* pointer to the VAR_DECL. */
+ const unsigned rid; /* RID number for the identifier. */
+ const int pretty; /* How pretty is it? */
};
/* The three ways of getting then name of the current function. */
combine_strings (strings)
tree strings;
{
- register tree value, t;
- register int length = 1;
+ tree value, t;
+ int length = 1;
int wide_length = 0;
int wide_flag = 0;
int wchar_bytes = TYPE_PRECISION (wchar_type_node) / BITS_PER_UNIT;
if (TREE_CHAIN (strings))
{
/* More than one in the chain, so concatenate. */
- register char *p, *q;
+ char *p, *q;
/* Don't include the \0 at the end of each substring,
except for the last one.
binary_op_error (code)
enum tree_code code;
{
- register const char *opname;
+ const char *opname;
switch (code)
{
tree *restype_ptr;
enum tree_code *rescode_ptr;
{
- register tree type;
+ tree type;
tree op0 = *op0_ptr;
tree op1 = *op1_ptr;
int unsignedp0, unsignedp1;
if (TREE_CONSTANT (primop0)
&& ! integer_zerop (primop1) && ! real_zerop (primop1))
{
- register tree tem = primop0;
- register int temi = unsignedp0;
+ tree tem = primop0;
+ int temi = unsignedp0;
primop0 = primop1;
primop1 = tem;
tem = op0;
return real_zerop (expr) ? boolean_false_node : boolean_true_node;
case ADDR_EXPR:
- /* If we are taking the address of a external decl, it might be zero
+ /* If we are taking the address of an external decl, it might be zero
if it is weak, so we cannot optimize. */
if (DECL_P (TREE_OPERAND (expr, 0))
&& DECL_EXTERNAL (TREE_OPERAND (expr, 0)))
|| !C_TYPE_OBJECT_OR_INCOMPLETE_P (TREE_TYPE (TREE_TYPE (decl))))
error ("invalid use of `restrict'");
else if (flag_strict_aliasing)
- {
- /* No two restricted pointers can point at the same thing.
- However, a restricted pointer can point at the same thing
- as an unrestricted pointer, if that unrestricted pointer
- is based on the restricted pointer. So, we make the
- alias set for the restricted pointer a subset of the
- alias set for the type pointed to by the type of the
- decl. */
-
- HOST_WIDE_INT pointed_to_alias_set
- = get_alias_set (TREE_TYPE (TREE_TYPE (decl)));
-
- if (pointed_to_alias_set == 0)
- /* It's not legal to make a subset of alias set zero. */
- ;
- else
- {
- DECL_POINTER_ALIAS_SET (decl) = new_alias_set ();
- record_alias_subset (pointed_to_alias_set,
- DECL_POINTER_ALIAS_SET (decl));
- }
- }
+ /* Indicate we need to make a unique alias set for this pointer.
+ We can't do it here because it might be pointing to an
+ incomplete type. */
+ DECL_POINTER_ALIAS_SET (decl) = -2;
}
}
or a type. Return -1 if we don't do anything special. */
HOST_WIDE_INT
-lang_get_alias_set (t)
+c_common_get_alias_set (t)
tree t;
{
tree u;
if (t1 != t)
return get_alias_set (t1);
}
- /* It's not yet safe to use alias sets for classes in C++ because
- the TYPE_FIELDs list for a class doesn't mention base classes. */
- else if (c_language == clk_cplusplus && AGGREGATE_TYPE_P (t))
- return 0;
return -1;
}
self_promoting_args_p (parms)
tree parms;
{
- register tree t;
+ tree t;
for (t = parms; t; t = TREE_CHAIN (t))
{
- register tree type = TREE_VALUE (t);
+ tree type = TREE_VALUE (t);
if (TREE_CHAIN (t) == 0 && type != void_type_node)
return 0;
void
c_mark_lang_decl (c)
- struct c_lang_decl *c;
+ struct c_lang_decl *c ATTRIBUTE_UNUSED;
{
}
#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
-static char c_tree_code_type[] = {
+static const char c_tree_code_type[] = {
'x',
#include "c-common.def"
};
#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
-static int c_tree_code_length[] = {
+static const int c_tree_code_length[] = {
0,
#include "c-common.def"
};
if (flag_bounds_check < 0)
flag_bounds_check = flag_bounded_pointers;
- lang_anon_aggr_type_p = anon_aggr_type_p;
-
/* Special format checking options don't work without -Wformat; warn if
they are used. */
if (warn_format_y2k && !warn_format)