aboutsummaryrefslogtreecommitdiff
path: root/gcc/libgcc2.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2000-02-01 23:51:38 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-02-01 23:51:38 +0000
commit78a0d70cdf5502320158d1a3ff41f5bdcadabdb0 (patch)
tree5baaef8b878781ee490f5410e86c28c9499bd88f /gcc/libgcc2.c
parentf232183759f43faadb2a392c6e03aaacd2172371 (diff)
downloadgcc-78a0d70cdf5502320158d1a3ff41f5bdcadabdb0.zip
gcc-78a0d70cdf5502320158d1a3ff41f5bdcadabdb0.tar.gz
gcc-78a0d70cdf5502320158d1a3ff41f5bdcadabdb0.tar.bz2
frame.c (find_fde): Convert for loop to do-while so compiler sees it's always executed at least once.
* frame.c (find_fde): Convert for loop to do-while so compiler sees it's always executed at least once. * libgcc2.c (BBINBUFSIZE): Kill. (__bb_init_prg): Use fgets. (__bb_exit_trace_func): Don't paste strings. * unroll.c (unroll_loop): Initialize unroll_type, not unroll_number, and tweak logic to match. * i386.c (ix86_expand_int_movcc): Add explicit 'return 0' in all failure paths. (ix86_flags_dependant): Likewise. Disentangle control flow. (ix86_sched_reorder): Break guts out to ix86_sched_reorder_pentium and ix86_sched_reorder_ppro. (ix86_sched_reorder_ppro): Initialize pair2 and insnp before any possible use. * i386.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Don't use string concatenation. Don't save and restore esi. * fixinc/Makefile.in (fixincl.sh): Don't depend on inclhack.def. (machname.h): Remove script to separate file. Use two-step sequence so target is not created if script fails. * fixinc/gen-machname.h: New file. Handle case where no non-reserved identifiers are defined. * fixinc/fixlib.c (mn_get_regexps): Return a flag: if MN_NAME_PAT is an empty string, machine_name doesn't need to do anything at all. (is_cxx_header): Add more cases to regexp. * fixinc/fixlib.h: Update prototype. * fixinc/fixtests.c, fixinc/fixfixes.c: Update callers of mn_get_regexps. * fixinc/fixincl.c: Define NO_BOGOSITY. * fixinc/inclhack.def (no_double_slash, else_endif_label): Ifdef out. (hp_sysfile): Add missing comma. (math_exception): Put the wrapper ifdefs at the beginning and the end of the file. * fixinc/fixincl.x, fixinc/inclhack.sh: Regenerate. From-SVN: r31744
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r--gcc/libgcc2.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 2775751..368b5c6 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -1881,11 +1881,6 @@ __bb_fork_func (void)
#define BBINBUFSIZE 500
-/* BBINBUFSIZE-1 with double quotes. We could use #BBINBUFSIZE or
- "BBINBUFSIZE" but want to avoid trouble with preprocessors. */
-
-#define BBINBUFSIZESTR "499"
-
struct bb_edge
{
struct bb_edge *next;
@@ -2163,8 +2158,8 @@ found: ;
struct bb_edge *bucket = bb_hashbuckets[i];
for ( ; bucket; bucket = bucket->next )
{
- fprintf (file, "Jump from block 0x%.*lx to "
- "block 0x%.*lx executed %*lu time(s)\n",
+ fprintf (file,
+ "Jump from block 0x%.*lx to block 0x%.*lx executed %*lu time(s)\n",
addr_len, bucket->src_addr,
addr_len, bucket->dst_addr,
cnt_len, bucket->count);
@@ -2235,8 +2230,12 @@ __bb_init_prg (void)
if (!(file = fopen ("bb.in", "r")))
return;
- while(fscanf (file, " %" BBINBUFSIZESTR "s ", buf) != EOF)
+ while(fgets (buf, BBINBUFSIZE, file) != 0)
{
+ i = strlen (buf);
+ if (buf[i] == '\n')
+ buf[i--] = '\0';
+
p = buf;
if (*p == '-')
{