aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixinc/fixlib.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/fixinc/fixlib.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/fixinc/fixlib.c')
-rw-r--r--gcc/fixinc/fixlib.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/fixinc/fixlib.c b/gcc/fixinc/fixlib.c
index edd0be6..6ca5646 100644
--- a/gcc/fixinc/fixlib.c
+++ b/gcc/fixinc/fixlib.c
@@ -122,7 +122,11 @@ is_cxx_header (fname, text)
tSCC cxxpat[] = "\
extern[ \t]*\"C\\+\\+\"|\
-\\*-[ \t]*([mM]ode:[ \t]*)?[cC]\\+\\+[; \t]*-\\*-|\
-template[ \t]*<";
+template[ \t]*<|\
+^[ \t]*class[ \t]|\
+(public|private|protected):|\
+^[ \t]*#[ \t]*pragma[ \t]+(interface|implementation)\
+";
static regex_t cxxre;
static int compiled;
@@ -187,12 +191,16 @@ static regex_t mn_name_re;
static int mn_compiled = 0;
-void
+int
mn_get_regexps( label_re, name_re, who )
regex_t **label_re;
regex_t **name_re;
tCC *who;
{
+ /* Maybe we don't need to do this fix at all? */
+ if (mn_name_pat[0] == '\0')
+ return 1;
+
if (! mn_compiled)
{
compile_re (mn_label_pat, &mn_label_re, 1, "label pattern", who);
@@ -201,4 +209,5 @@ mn_get_regexps( label_re, name_re, who )
}
*label_re = &mn_label_re;
*name_re = &mn_name_re;
+ return 0;
}