+2001-01-02 Andreas Jaeger <aj@suse.de>
+
+ * c-decl.c (c_decode_option): Remove support of
+ -Wmissing-noreturn.
+
+ * toplev.c (documented_lang_options): Remove -Wmissing-noreturn.
+ (W_options): Add -Wmissing-noreturn here.
+
+ * flow.c: Define lang_missing_noreturn_ok_p.
+ (check_function_return_warnings): Use it.
+
+ * c-common.h: Declare lang_missing_noreturn_ok_p.
+
+ * c-lang.c (c_missing_noreturn_ok_p): New function.
+ (lang_init): Set lang_missing_noreturn_ok_p.
+
+ * invoke.texi (Warning Options): Document this.
+
2000-12-27 Phil Edwards <pme@sources.redhat.com>
* extend.texi (C++ Extensions): New node for C++ attributes;
* unroll.c (copy_loop_body, loop_iterations): Likewise.
(remap_split_bivs): Likewise.
-2001-01-01 Michael Hayes <mhayes@redhat.com>
+2001-01-01 Michael Hayes <mhayes@redhat.com>
* loop.c (loop_ivs_free): New function.
(strength_reduce): Break out from...
2001-01-01 Michael Hayes <mhayes@redhat.com>
-
+
* loop.h (struct iv): New.
(REG_IV_TYPE, REG_IV_CLASS, REG_INFO): Modify to use 'struct iv'.
(struct loop_ivs): Replace 'reg_iv_type', 'reg_iv_info',
* loop.h (REG_IV_CLASS): New accessor macro.
* loop.c (REG_IV_CLASS): Use it instead of reg_iv_class array.
* unroll.c (REG_IV_CLASS): Likewise.
-
+
Sun Dec 31 19:20:51 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* dwarf2out.c (loc_descriptor_from_tree, case WITH_RECORD_EXPR): New.
(prescan_loop): Set pre_header_has_call in loop_info.
* loop.h (struct_iv_class): Add `final_value' and `all_reduced'.
(struct loop_info): Add `pre_header_has_call'.
-
+
* loop.c (loop_bivs_find): Break out from strength_reduce.
(loop_bivs_init_find, loop_bivs_check, loop_givs_find): Likewise.
(loop_givs_check, loop_biv_eliminable_p): Likewise.
-
+
* loop.c (LOOP_REG_LIFETIME, LOOP_REG_GLOBAL_P): Define.
(scan_loop, record_giv): Use LOOP_REG_LIFETIME and LOOP_REG_GLOBAL_P.
-
+
* loop.h (REGNO_FIRST_LUID, REGNO_LAST_LUID): Define.
* loop.c (REGNO_FIRST_LUID, REGNO_LAST_LUID): Use in place of
direct access to uid_luid array.
2000-12-30 Philip Blundell <philb@gnu.org>
- * config/arm/arm.c (arm_expand_prologue): Fix typos in error
+ * config/arm/arm.c (arm_expand_prologue): Fix typos in error
message and comment. Note location of testcase for an unhandled
situation.
* stmt.c (expand_decl): Don't use assign_stack_temp in error case.
(add_case_node): No need to copy nodes anymore.
-
+
2000-12-30 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (split_branches): Don't dereference re-computed
* calls.c (store_one_arg): If parm is passed both in stack and in
register and offset is greater than reg_parm_stack_space, split
- the offset and call emit_push_insn().
+ the offset and call emit_push_insn().
2000-12-27 Nick Clifton <nickc@redhat.com>
between conditionally executed insns.
(sched_analyze_1, sched_analyze_2, sched_analyze_insn): Don't free
dependency lists if current insn is a COND_EXEC.
-
+
2000-12-27 Geoffrey Keating <geoffk@redhat.com>
* config/rs6000/rs6000.md (define_attr "length"): Correct
(arm_expand_prologue): If the link register has not been saved set
lr_save_eliminated and emit a USE to prevent later passes from
scavenging it.
-
+
* dwarf2out_frame_debug_expr: Allow the (scratch) frame
pointer to be initialised from the stack pointer plus a
constant.
* dwarf2out.c (file_info_cmp): Prototype.
(dwarf2out_line): Hide variable `old_in_use'.
-
+
* objc-act.c (objc_fatal): Delete.
* sched-vis.c (visualize_stall_cycles): Remove unused variable.
(nop_m, nop_i, nop_f, nop_b, nop_x, cycle_display, cycle_display_1,
bundle_selector): New patterns.
(insn_group_barrier): Now has an operand.
-
+
2000-12-21 DJ Delorie <dj@redhat.com>
* dwarf2out.c (simple_decl_align_in_bits): new
* config/c4x/c4x-protos.h (c4x_init_builtins): Add tree argument.
- * config/c4x/c4x.c (c4x_init_builtins): Add tree argument.
+ * config/c4x/c4x.c (c4x_init_builtins): Add tree argument.
(c4x_output_ascii): Fix.
-
+
2000-12-17 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
(*toieee_movqf_clobber, *frieee_movqf_clobber): Likewise.
2000-12-17 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
-
+
* libgcc2.h: Use Wtype for SItype and DWtype for DItype in prototypes.
* libgcc2.c (__absvsi2): Use Wtype and DWtype.
(__absvdi2, __addvsi3, __addvdi3, __subvsi3): Likewise.
(do_warning): New function.
(finclude): Skip past the newline and increase the line number
before calling output_line_command.
- (do_line): Skip the new line after output_line_command. Don't
- pre-decrement the line number.
+ (do_line): Skip the new line after output_line_command. Don't
+ pre-decrement the line number.
2000-12-15 Diego Novillo <dnovillo@redhat.com>
* alias.c (get_alias_set): Call record_component_aliases for
COMPLEX_TYPE.
(record_component_aliases): Handle COMPLEX_TYPE.
-
+
2000-12-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* fixinc/gnu-regex.c: Disable NLS.
* gcc.c (cpp_options): Update to use '&'.
(struct switchstr): Change type of validated to save space.
New member 'ordering'.
- (handle_braces, validate_switches): Update to handle '&'.
+ (handle_braces, validate_switches): Update to handle '&'.
2000-12-13 Laurynas Biveinis <lauras@softhome.net>
* tradcpp.c (special_symbol): Improve test for definedness,
though it is still not perfect.
(do_define): Don't define illegal macro names.
-
+
2000-12-07 Aldy Hernandez <aldyh@redhat.com>
* config/mips/elf.h (ASM_OUTPUT_SECTION_NAME): emit @nobits
* cppfiles.c (stack_include_file): Update.
(_cpp_pop_file_buffer): Update.
* cpphash.h (struct cpp_buffer): New members
- include_stack_listed and type.
+ include_stack_listed and type.
* cpplib.c (_cpp_handle_directive): Buffer->inc is not null.
(run_directive): Take buffer type. cpp_push_buffer cannot fail.
(_cpp_do__Pragma, cpp_define, _cpp_define_builtin, cpp_undef,
2000-12-09 Richard Henderson <rth@redhat.com>
- * genrecog.c (validate_pattern): Verify that ZERO_EXTRACT and
+ * genrecog.c (validate_pattern): Verify that ZERO_EXTRACT and
STRICT_LOW_PART as SET_DEST have in-out constraints.
2000-12-09 Joseph S. Myers <jsm28@cam.ac.uk>
2000-12-02 Geoffrey Keating <geoffk@redhat.com>
* c-common.c (combine_strings): When the ISO C standard specifies
- the maximum length of a string, it doesn't include the trailing
- zero byte.
+ the maximum length of a string, it doesn't include the trailing
+ zero byte.
* cpplib.c (do_ifdef): Add check_eol() call.
(do_ifndef): Likewise.
2000-12-01 Jim Blandy <jimb@redhat.com>
* dbxout.c (dbxout_parms): Correctly describe parameters passed by
- invisible reference in registers, but then spilled to the stack.
- Remove code to emit a second stab for such parameters; it attempts
- to describe the value's location by introducing a synthetic C++
- `reference' type, and then saying the stack slot has that
- reference type. This loses type information (breaking GDB's
- `ptype' command, among other things) just to describe a location
- which stabs can represent correctly in other ways.
+ invisible reference in registers, but then spilled to the stack.
+ Remove code to emit a second stab for such parameters; it attempts
+ to describe the value's location by introducing a synthetic C++
+ `reference' type, and then saying the stack slot has that
+ reference type. This loses type information (breaking GDB's
+ `ptype' command, among other things) just to describe a location
+ which stabs can represent correctly in other ways.
2000-12-01 Alexandre Oliva <aoliva@redhat.com>
canonicalizes conditional compares.
(arm_select_cc_mode): Likewise.
* arm.md: Garbage collect some dead code.
- (cmp_and, cmp_ior): New patterns.
+ (cmp_and, cmp_ior): New patterns.
(splitter for conditional move with inverted false): Use cond_exec
and handle unordered comparisons.
arm_subsi3_insn, anddi_zesidi_di, arm_andsi3_insn, anddi_notdi_di,
anddi_notzesidi_di, anddi_notsesidi_di, arm_iorsi3,
one_cmpldi2): Merge with splitters to create define_insn_and_split
- patterns. Remove redundant splits.
+ patterns. Remove redundant splits.
(peephole2 for add:SI of invalid immediate): New.
(peephole2 for minus:SI of invalid immediate): New.
(peephole2 for ior:SI of invalid immediate): New.
* dwarf2out.c (UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP,
UNALIGNED_DOUBLE_INT_ASM_OP, SECTION_ASM_OP, ASM_BYTE_OP): Here.
* dwarfout.c (FILE_ASM_OP, VERSION_ASM_OP,
- UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP, ASM_BYTE_OP,
+ UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP, ASM_BYTE_OP,
PUSHSECTION_ASM_OP, POPSECTION_ASM_OP): Here.
* defaults.h (ASM_STABD_OP, EH_FRAME_SECTION_ASM_OP): Here.
* varasm.c (ASM_STABS_OP): Here.
/* Definitions for c-common.c.
Copyright (C) 1987, 1993, 1994, 1995, 1997, 1998,
- 1999, 2000 Free Software Foundation, Inc.
+ 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
etc. */
clk_cplusplus, /* ANSI/ISO C++ */
clk_objective_c /* Objective C */
-}
+}
c_language_kind;
/* Information about a statement tree. */
However, in order to represent aggregate initialization code as
tree structure, we use statement-expressions. The statements
within the statement expression should not result in cleanups
- being run until the entire enclosing statement is complete.
+ being run until the entire enclosing statement is complete.
This flag has no effect in C. */
- int stmts_are_full_exprs_p;
+ int stmts_are_full_exprs_p;
};
typedef struct stmt_tree_s *stmt_tree;
extern void (*lang_expand_decl_stmt) PARAMS ((tree));
extern void (*lang_expand_function_end) PARAMS ((void));
+/* Callback that determines if it's ok for a function to have no
+ noreturn attribute. */
+extern int (*lang_missing_noreturn_ok_p) PARAMS ((tree));
+
+
/* The type of a function that walks over tree structure. */
-typedef tree (*walk_tree_fn) PARAMS ((tree *,
- int *,
+typedef tree (*walk_tree_fn) PARAMS ((tree *,
+ int *,
void *));
extern stmt_tree current_stmt_tree PARAMS ((void));
descending through array types. Note that this macro evaluates its
arguments mor than once. */
#define C_TYPE_QUALS(TYPE) \
- (TYPE_QUALS ((TREE_CODE (TYPE) == ARRAY_TYPE \
+ (TYPE_QUALS ((TREE_CODE (TYPE) == ARRAY_TYPE \
&& c_language == clk_cplusplus) \
? strip_array_types (TYPE) : TYPE))
#define ASM_CLOBBERS(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 4)
/* DECL_STMT accessor. This gives access to the DECL associated with
- the given declaration statement. */
+ the given declaration statement. */
#define DECL_STMT_DECL(NODE) TREE_OPERAND (DECL_STMT_CHECK (NODE), 0)
/* STMT_EXPR accessor. */
/* Nonzero if this SCOPE_STMT is for the beginning of a scope. */
#define SCOPE_BEGIN_P(NODE) \
- (TREE_LANG_FLAG_0 (SCOPE_STMT_CHECK (NODE)))
+ (TREE_LANG_FLAG_0 (SCOPE_STMT_CHECK (NODE)))
/* Nonzero if this SCOPE_STMT is for the end of a scope. */
#define SCOPE_END_P(NODE) \
/* Nonzero for a SCOPE_STMT if this statement is for a partial scope.
For example, in:
-
+
S s;
l:
S s2;
/* If non-zero, the STMT_LINENO for NODE is the line at which the
function ended. */
-#define STMT_LINENO_FOR_FN_P(NODE) \
+#define STMT_LINENO_FOR_FN_P(NODE) \
(TREE_LANG_FLAG_2 ((NODE)))
/* Nonzero if we want the new ISO rules for pushing a new scope for `for'
initialization variables. */
-#define NEW_FOR_SCOPE_P(NODE) (TREE_LANG_FLAG_0 (NODE))
+#define NEW_FOR_SCOPE_P(NODE) (TREE_LANG_FLAG_0 (NODE))
#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
extern void mark_c_language_function PARAMS ((struct language_function *));
-extern int case_compare PARAMS ((splay_tree_key,
+extern int case_compare PARAMS ((splay_tree_key,
splay_tree_key));
extern tree c_add_case_label PARAMS ((splay_tree,
extern void dump_time_statistics PARAMS ((void));
#endif
-
-
/* Process declarations and variables for C compiler.
- Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
- Free Software Foundation, Inc.
+ Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
warn_bad_function_cast = 1;
else if (!strcmp (p, "-Wno-bad-function-cast"))
warn_bad_function_cast = 0;
- else if (!strcmp (p, "-Wmissing-noreturn"))
- warn_missing_noreturn = 1;
else if (!strcmp (p, "-Wno-missing-noreturn"))
warn_missing_noreturn = 0;
else if (!strcmp (p, "-Wmissing-format-attribute"))
else if (decl_context == FIELD)
{
/* ??? Need to check somewhere that this is a structure
- and not a union, that this field is last, and that
+ and not a union, that this field is last, and that
this structure has at least one other named member. */
if (pedantic && !flag_isoc99 && !in_system_header)
init_function_start (fndecl, input_filename, lineno);
/* Begin the statement tree for this function. */
- DECL_LANG_SPECIFIC (current_function_decl)
+ DECL_LANG_SPECIFIC (current_function_decl)
=((struct lang_decl *) ggc_alloc (sizeof (struct lang_decl)));
begin_stmt_tree (&DECL_SAVED_TREE (current_function_decl));
pop_function_context ();
}
}
-
+
}
\f
/* Check the declarations given in a for-loop for satisfying the C99
struct function *f;
{
struct c_language_function *p;
- p = ((struct c_language_function *)
+ p = ((struct c_language_function *)
xmalloc (sizeof (struct c_language_function)));
f->language = (struct language_function *) p;
pop_c_function_context (f)
struct function *f;
{
- struct c_language_function *p
+ struct c_language_function *p
= (struct c_language_function *) f->language;
tree link;
mark_c_function_context (f)
struct function *f;
{
- struct c_language_function *p
+ struct c_language_function *p
= (struct c_language_function *) f->language;
if (p == 0)
stmt = add_stmt (build_stmt (COMPOUND_STMT, NULL_TREE));
/* If we haven't already declared __FUNCTION__ and its ilk then this
is the opening curly brace of the function. Declare them now. */
- if (!c_function_name_declared_p)
+ if (!c_function_name_declared_p)
{
c_function_name_declared_p = 1;
declare_function_name ();
}
-
+
return stmt;
}
tree t;
{
tree decl = DECL_STMT_DECL (t);
-
+
/* Expand nested functions. */
if (TREE_CODE (decl) == FUNCTION_DECL
&& DECL_CONTEXT (decl) == current_function_decl
/* Language-specific hook definitions for C front end.
Copyright (C) 1991, 1995, 1997, 1998,
- 1999, 2000 Free Software Foundation, Inc.
+ 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
#include "cpplib.h"
static int c_tree_printer PARAMS ((output_buffer *));
+static int c_missing_noreturn_ok_p PARAMS ((tree));
/* Each of the functions defined here
is an alternative to a function in objc-actions.c. */
-
+
int
lang_decode_option (argc, argv)
int argc;
lang_safe_from_p = &c_safe_from_p;
lang_printer = &c_tree_printer;
lang_expand_decl_stmt = &c_expand_decl_stmt;
+ lang_missing_noreturn_ok_p = &c_missing_noreturn_ok_p;
c_parse_init ();
}
tree body;
start_function (void_list_node_1,
- build_parse_node (CALL_EXPR, fnname,
- tree_cons (NULL_TREE, NULL_TREE,
+ build_parse_node (CALL_EXPR, fnname,
+ tree_cons (NULL_TREE, NULL_TREE,
void_list_node_1),
NULL_TREE),
NULL_TREE, NULL_TREE);
tree block;
scope = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0);
- block = poplevel (0, 0, 0);
+ block = poplevel (0, 0, 0);
SCOPE_STMT_BLOCK (TREE_PURPOSE (scope)) = block;
SCOPE_STMT_BLOCK (TREE_VALUE (scope)) = block;
- RECHAIN_STMTS (body, COMPOUND_BODY (body));
+ RECHAIN_STMTS (body, COMPOUND_BODY (body));
finish_function (0);
}
finish_cdtor (body);
}
#endif
-
+
if (back_end_hook)
(*back_end_hook) (getdecls ());
return 0;
}
}
+
+static int
+c_missing_noreturn_ok_p (decl)
+ tree decl;
+{
+ /* A missing noreturn is not ok for freestanding implementations and
+ ok for the `main' function in hosted implementations. */
+ return flag_hosted && MAIN_NAME_P (DECL_ASSEMBLER_NAME (decl));
+}
/* Data flow analysis for GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000 Free Software Foundation, Inc.
+ 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
are another pair, etc. */
rtx regs_may_share;
+/* Callback that determines if it's ok for a function to have no
+ noreturn attribute. */
+int (*lang_missing_noreturn_ok_p) PARAMS ((tree));
+
/* Set of registers that may be eliminable. These are handled specially
in updating regs_ever_live. */
static void invalidate_mems_from_set PARAMS ((struct propagate_block_info *,
rtx));
static void remove_fake_successors PARAMS ((basic_block));
-static void flow_nodes_print PARAMS ((const char *, const sbitmap,
+static void flow_nodes_print PARAMS ((const char *, const sbitmap,
FILE *));
static void flow_edge_list_print PARAMS ((const char *, const edge *,
int, FILE *));
static void flow_loops_cfg_dump PARAMS ((const struct loops *,
FILE *));
-static int flow_loop_nested_p PARAMS ((struct loop *,
+static int flow_loop_nested_p PARAMS ((struct loop *,
struct loop *));
-static int flow_loop_entry_edges_find PARAMS ((basic_block, const sbitmap,
+static int flow_loop_entry_edges_find PARAMS ((basic_block, const sbitmap,
edge **));
static int flow_loop_exit_edges_find PARAMS ((const sbitmap, edge **));
static int flow_loop_nodes_find PARAMS ((basic_block, basic_block, sbitmap));
{
if (warn_missing_noreturn
&& !TREE_THIS_VOLATILE (cfun->decl)
- && EXIT_BLOCK_PTR->pred == NULL)
+ && EXIT_BLOCK_PTR->pred == NULL
+ && (lang_missing_noreturn_ok_p
+ && !lang_missing_noreturn_ok_p (cfun->decl)))
warning ("function might be possible candidate for attribute `noreturn'");
/* If we have a path to EXIT, then we do return. */
/* Redirect the src of the successor edges of bb to point to new_bb. */
for (e = new_bb->succ; e; e = e->succ_next)
e->src = new_bb;
-
+
/* Place the new block just after the block being split. */
VARRAY_GROW (basic_block_info, ++n_basic_blocks);
propagate_block to determine which registers are live. */
COPY_REG_SET (new_bb->global_live_at_start, bb->global_live_at_end);
propagate_block (new_bb, new_bb->global_live_at_start, NULL, NULL, 0);
- COPY_REG_SET (bb->global_live_at_end,
+ COPY_REG_SET (bb->global_live_at_end,
new_bb->global_live_at_start);
}
SET_REGNO_REG_SET (new_live_at_end, STACK_POINTER_REGNUM);
/* Before reload, there are a few registers that must be forced
- live everywhere -- which might not already be the case for
+ live everywhere -- which might not already be the case for
blocks within infinite loops. */
if (! reload_completed)
{
#ifdef AUTO_INC_DEC
/* Check if memory reference matches an auto increment. Only
post increment/decrement or modify are valid. */
- if (GET_MODE (mem) == GET_MODE (r)
+ if (GET_MODE (mem) == GET_MODE (r)
&& (GET_CODE (XEXP (mem, 0)) == POST_DEC
|| GET_CODE (XEXP (mem, 0)) == POST_INC
|| GET_CODE (XEXP (mem, 0)) == POST_MODIFY)
the in-order traversal. */
if (xdata[1] >= (int) node->key)
return 0;
-
+
/* Splice out portions of the expression that refer to regno. */
rcli = (struct reg_cond_life_info *) node->value;
rcli->condition = elim_reg_cond (rcli->condition, regno);
/* Update insns block within BB. */
-void
+void
update_bb_for_insn (bb)
basic_block bb;
{
if (EDGE_INDEX (elist, BASIC_BLOCK (pred), BASIC_BLOCK (succ))
!= EDGE_INDEX_NO_EDGE && found_edge == 0)
fprintf (f, "*** Edge (%d, %d) has index %d, but there is no edge\n",
- pred, succ, EDGE_INDEX (elist, BASIC_BLOCK (pred),
+ pred, succ, EDGE_INDEX (elist, BASIC_BLOCK (pred),
BASIC_BLOCK (succ)));
}
for (succ = 0; succ < n_basic_blocks; succ++)
\f
/* Dump the list of basic blocks in the bitmap NODES. */
-static void
+static void
flow_nodes_print (str, nodes, file)
const char *str;
const sbitmap nodes;
/* Dump the list of edges in the array EDGE_LIST. */
-static void
+static void
flow_edge_list_print (str, edge_list, num_edges, file)
const char *str;
const edge *edge_list;
/* Dump the loop information specified by LOOPS to the stream FILE,
using auxiliary dump callback function LOOP_DUMP_AUX if non null. */
-void
+void
flow_loops_dump (loops, file, loop_dump_aux, verbose)
const struct loops *loops;
FILE *file;
if (! num_loops || ! file)
return;
- fprintf (file, ";; %d loops found, %d levels\n",
+ fprintf (file, ";; %d loops found, %d levels\n",
num_loops, loops->levels);
for (i = 0; i < num_loops; i++)
must be disjoint. */
disjoint = ! flow_loop_nested_p (smaller ? loop : oloop,
smaller ? oloop : loop);
- fprintf (file,
+ fprintf (file,
";; loop header %d shared by loops %d, %d %s\n",
loop->header->index, i, j,
disjoint ? "disjoint" : "nested");
for (e = header->pred; e; e = e->pred_next)
{
basic_block src = e->src;
-
+
if (src == ENTRY_BLOCK_PTR || ! TEST_BIT (nodes, src->index))
num_entries++;
}
for (e = header->pred; e; e = e->pred_next)
{
basic_block src = e->src;
-
+
if (src == ENTRY_BLOCK_PTR || ! TEST_BIT (nodes, src->index))
(*entry_edges)[num_entries++] = e;
}
EXECUTE_IF_SET_IN_SBITMAP (nodes, 0, node, {
for (e = BASIC_BLOCK (node)->succ; e; e = e->succ_next)
{
- basic_block dest = e->dest;
+ basic_block dest = e->dest;
if (dest == EXIT_BLOCK_PTR || ! TEST_BIT (nodes, dest->index))
num_exits++;
EXECUTE_IF_SET_IN_SBITMAP (nodes, 0, node, {
for (e = BASIC_BLOCK (node)->succ; e; e = e->succ_next)
{
- basic_block dest = e->dest;
+ basic_block dest = e->dest;
if (dest == EXIT_BLOCK_PTR || ! TEST_BIT (nodes, dest->index))
(*exit_edges)[num_exits++] = e;
must always be built if this function is called. */
if (! (flags & LOOP_TREE))
abort ();
-
+
memset (loops, 0, sizeof (*loops));
/* Taking care of this degenerate case makes the rest of
loop->nodes = sbitmap_alloc (n_basic_blocks);
loop->num_nodes
= flow_loop_nodes_find (loop->header, loop->latch, loop->nodes);
-
+
/* Compute first and last blocks within the loop.
These are often the same as the loop header and
loop latch respectively, but this is not always
= BASIC_BLOCK (sbitmap_first_set_bit (loop->nodes));
loop->last
= BASIC_BLOCK (sbitmap_last_set_bit (loop->nodes));
-
+
if (flags & LOOP_EDGES)
{
/* Find edges which enter the loop header.
= flow_loop_entry_edges_find (loop->header,
loop->nodes,
&loop->entry_edges);
-
+
/* Find edges which exit the loop. */
loop->num_exits
= flow_loop_exit_edges_find (loop->nodes,
&loop->exit_edges);
-
+
/* Determine which loop nodes dominate all the exits
of the loop. */
loop->exits_doms = sbitmap_alloc (n_basic_blocks);
for (j = 0; j < loop->num_exits; j++)
sbitmap_a_and_b (loop->exits_doms, loop->exits_doms,
dom[loop->exit_edges[j]->src->index]);
-
+
/* The header of a natural loop must dominate
all exits. */
if (! TEST_BIT (loop->exits_doms, loop->header->index))
abort ();
}
-
+
if (flags & LOOP_PRE_HEADER)
{
/* Look to see if the loop has a pre-header node. */
- loop->pre_header
+ loop->pre_header
= flow_loop_pre_header_find (loop->header, dom);
flow_loop_pre_header_scan (loop);
throw away the old stuff and rebuild what we need. */
if (loops->array)
flow_loops_free (loops);
-
+
return flow_loops_find (loops, flags);
}
@ignore
@c man begin COPYRIGHT
Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
-1998, 1999, 2000 Free Software Foundation, Inc.
+1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
Note these are only possible candidates, not absolute ones. Care should
be taken to manually verify functions actually do not ever return before
adding the @code{noreturn} attribute, otherwise subtle code generation
-bugs could be introduced.
+bugs could be introduced. You will not get a warning for @code{main} in
+hosted C environments.
@item -Wmissing-format-attribute
If @samp{-Wformat} is enabled, also warn about functions which might be
/* Top level of GNU C compiler
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000 Free Software Foundation, Inc.
+ 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
lang_independent_options f_options[] =
{
- {"eliminate-dwarf2-dups", &flag_eliminate_dwarf2_dups, 1,
+ {"eliminate-dwarf2-dups", &flag_eliminate_dwarf2_dups, 1,
"Perform DWARF2 duplicate elimination"},
{"float-store", &flag_float_store, 1,
"Do not store floats in registers" },
{ "-Wbad-function-cast",
"Warn about casting functions to incompatible types" },
{ "-Wno-bad-function-cast", "" },
- { "-Wmissing-noreturn",
- "Warn about functions which might be candidates for attribute noreturn" },
{ "-Wno-missing-noreturn", "" },
{ "-Wmissing-format-attribute",
"Warn about functions which might be candidates for format attributes" },
{"padded", &warn_padded, 1,
"Warn when padding is required to align struct members"},
{"disabled-optimization", &warn_disabled_optimization, 1,
- "Warn when an optimization pass is disabled"}
+ "Warn when an optimization pass is disabled"},
+ {"missing-noreturn", &warn_missing_noreturn, 1,
+ "Warn about functions which might be candidates for attribute noreturn"}
};
\f
/* Output files for assembler code (real compiler output)
double s, d;
if (x < 0)
- abort ();
+ abort ();
if (x == 0)
return 0;
do
{
d = (s * s - x) / (2 * s);
- s -= d;
- }
+ s -= d;
+ }
while (d > .0001);
return s;
}
if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl)
&& (! TREE_READONLY (decl)
|| TREE_PUBLIC (decl)
- || (!optimize
+ || (!optimize
&& flag_keep_static_consts
&& !DECL_ARTIFICIAL (decl))
|| TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))))
integrate.*/
rtx_equal_function_value_matters = 0;
purge_hard_subreg_sets (get_insns ());
-
+
/* Don't return yet if -Wreturn-type; we need to do jump_optimize. */
if ((rtl_dump_and_exit || flag_syntax_only) && !warn_return_type)
goto exit_rest_of_compilation;
insns = get_insns ();
eliminate_dead_code();
-
+
close_dump_file (DFI_dce, print_rtl_with_bb, insns);
timevar_pop (TV_DEAD_CODE_ELIM);
}