This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gcc-in-cxx] Revert adding newlines for semicolon in loops
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 10 May 2009 17:38:00 -0700
- Subject: [gcc-in-cxx] Revert adding newlines for semicolon in loops
Since this patch:
2008-11-12 Jakub Jelinek <jakub@redhat.com>
PR c++/36478
Revert:
2007-05-07 Mike Stump <mrs@apple.com>
* parser.c (check_empty_body): Add.
(cp_parser_iteration_statement): Add call to check_empty_body.
g++ no longer warns about an empty loop with no whitespace between the
loop statement and the semicolon. I committed this patch to the
gcc-in-cxx branch to revert cases where a newline had been added to
avoid the g++ warning.
Ian
2009-05-10 Ian Lance Taylor <iant@google.com>
Revert the following patches:
2009-02-04 Ian Lance Taylor <iant@google.com>
* cse.c (insert): Put empty loop ';' on new line.
* emit-rtl.c (push_to_sequence): Likewise.
* haifa-sched.c (max_issue): Put empty loop ';' on new line.
* matrix-reorg.c (add_allocation_site): Likewise.
* postreload-gcse.c (eliminate_partially_redundant_load):
Likewise.
* sched-rgn.c (rgn_add_block): Likewise.
(rgn_fix_recovery_cfg): Likewise.
* tree-loop-distribution.c (rdg_flag_similar_memory_accesses):
Likewise.
2009-02-03 Ian Lance Taylor <iant@google.com>
* tree.c (attribute_list_contained): Put empty loop ';' on new
line.
2009-01-31 Ian Lance Taylor <iant@google.com>
* reload.c (alternative_allows_const_pool_ref): Put empty loop ';'
on new line.
2008-07-04 Tom Tromey <tromey@redhat.com>
* java/mangle.c (emit_compression_string): Insert newline.
Index: tree-loop-distribution.c
===================================================================
--- tree-loop-distribution.c (revision 147352)
+++ tree-loop-distribution.c (working copy)
@@ -791,8 +791,7 @@ rdg_flag_similar_memory_accesses (struct
/* If the node I has two uses, then keep these together in the
same PARTITION. */
- for (n = 0, e = rdg->vertices[i].succ; e; e = e->succ_next, n++)
- ;
+ for (n = 0, e = rdg->vertices[i].succ; e; e = e->succ_next, n++);
if (n > 1)
rdg_flag_all_uses (rdg, i, partition, loops, processed, &foo);
Index: java/mangle.c
===================================================================
--- java/mangle.c (revision 147352)
+++ java/mangle.c (working copy)
@@ -702,8 +702,7 @@ emit_compression_string (int i)
unsigned HOST_WIDE_INT n;
unsigned HOST_WIDE_INT m=1;
/* How many digits for I in base 36? */
- for (n = i; n >= 36; n /= 36, m *=36)
- ;
+ for (n = i; n >= 36; n /= 36, m *=36);
/* Write the digits out */
while (m > 0)
{
Index: postreload-gcse.c
===================================================================
--- postreload-gcse.c (revision 147352)
+++ postreload-gcse.c (working copy)
@@ -1128,8 +1128,7 @@ eliminate_partially_redundant_load (basi
discover additional redundancies, so mark it for later deletion. */
for (a_occr = get_bb_avail_insn (bb, expr->avail_occr);
a_occr && (a_occr->insn != insn);
- a_occr = get_bb_avail_insn (bb, a_occr->next))
- ;
+ a_occr = get_bb_avail_insn (bb, a_occr->next));
if (!a_occr)
{
Index: tree.c
===================================================================
--- tree.c (revision 147352)
+++ tree.c (working copy)
@@ -4824,8 +4824,7 @@ attribute_list_contained (const_tree l1,
t1 != 0 && t2 != 0
&& TREE_PURPOSE (t1) == TREE_PURPOSE (t2)
&& TREE_VALUE (t1) == TREE_VALUE (t2);
- t1 = TREE_CHAIN (t1), t2 = TREE_CHAIN (t2))
- ;
+ t1 = TREE_CHAIN (t1), t2 = TREE_CHAIN (t2));
/* Maybe the lists are equal. */
if (t1 == 0 && t2 == 0)
Index: reload.c
===================================================================
--- reload.c (revision 147352)
+++ reload.c (working copy)
@@ -4565,8 +4565,7 @@ alternative_allows_const_pool_ref (rtx m
/* Skip alternatives before the one requested. */
while (altnum > 0)
{
- while (*constraint++ != ',')
- ;
+ while (*constraint++ != ',');
altnum--;
}
/* Scan the requested alternative for TARGET_MEM_CONSTRAINT or 'o'.
Index: haifa-sched.c
===================================================================
--- haifa-sched.c (revision 147352)
+++ haifa-sched.c (working copy)
@@ -2131,8 +2131,7 @@ max_issue (struct ready_list *ready, int
{
n = privileged_n;
/* Try to find issued privileged insn. */
- while (n && !ready_try[--n])
- ;
+ while (n && !ready_try[--n]);
}
if (/* If all insns are equally good... */
Index: cse.c
===================================================================
--- cse.c (revision 147352)
+++ cse.c (working copy)
@@ -1465,8 +1465,7 @@ insert (rtx x, struct table_elt *classp,
struct table_elt *p, *next;
for (p = classp; (next = p->next_same_value) && CHEAPER (next, elt);
- p = next)
- ;
+ p = next);
/* Put it after P and before NEXT. */
elt->next_same_value = next;
Index: matrix-reorg.c
===================================================================
--- matrix-reorg.c (revision 147352)
+++ matrix-reorg.c (working copy)
@@ -738,8 +738,7 @@ add_allocation_site (struct matrix_info
must be set accordingly. */
for (min_malloc_level = 0;
min_malloc_level < mi->max_malloced_level
- && mi->malloc_for_level[min_malloc_level]; min_malloc_level++)
- ;
+ && mi->malloc_for_level[min_malloc_level]; min_malloc_level++);
if (level < min_malloc_level)
{
mi->allocation_function_decl = current_function_decl;
Index: emit-rtl.c
===================================================================
--- emit-rtl.c (revision 147352)
+++ emit-rtl.c (working copy)
@@ -4915,8 +4915,7 @@ push_to_sequence (rtx first)
start_sequence ();
- for (last = first; last && NEXT_INSN (last); last = NEXT_INSN (last))
- ;
+ for (last = first; last && NEXT_INSN (last); last = NEXT_INSN (last));
first_insn = first;
last_insn = last;
Index: sched-rgn.c
===================================================================
--- sched-rgn.c (revision 147352)
+++ sched-rgn.c (working copy)
@@ -3336,8 +3336,7 @@ rgn_add_block (basic_block bb, basic_blo
/* Now POS is the index of the last block in the region. */
/* Find index of basic block AFTER. */
- for (; rgn_bb_table[pos] != after->index; pos--)
- ;
+ for (; rgn_bb_table[pos] != after->index; pos--);
pos++;
gcc_assert (pos > ebb_head[i - 1]);
@@ -3384,14 +3383,12 @@ rgn_fix_recovery_cfg (int bbi, int check
for (old_pos = ebb_head[BLOCK_TO_BB (check_bbi) + 1] - 1;
rgn_bb_table[old_pos] != check_bb_nexti;
- old_pos--)
- ;
+ old_pos--);
gcc_assert (old_pos > ebb_head[BLOCK_TO_BB (check_bbi)]);
for (new_pos = ebb_head[BLOCK_TO_BB (bbi) + 1] - 1;
rgn_bb_table[new_pos] != bbi;
- new_pos--)
- ;
+ new_pos--);
new_pos++;
gcc_assert (new_pos > ebb_head[BLOCK_TO_BB (bbi)]);