summaryrefslogtreecommitdiff
path: root/gcc/libgcc2.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-01 23:51:38 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-01 23:51:38 +0000
commit641b112bd09b36c5b3d3072fab4eed430a140b48 (patch)
tree5baaef8b878781ee490f5410e86c28c9499bd88f /gcc/libgcc2.c
parent584727c9cc0be3bd6cbcb686b53addbfea9b4183 (diff)
downloadgcc-641b112bd09b36c5b3d3072fab4eed430a140b48.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31744 138bc75d-0d04-0410-961f-82ee72b054a4
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 2775751aca9..368b5c6dd5b 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 == '-')
{