diff options
author | Jeffrey A Law <law@cygnus.com> | 1999-06-11 02:20:58 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-06-10 20:20:58 -0600 |
commit | 5cda1ab62a9d6a83c067a3f81bd54be0034d14e1 (patch) | |
tree | 7ba582e1752f30397bbd399bb48faa80370561ef | |
parent | 53dfe2970af0655b568d1986d3fb36fed93c0e6c (diff) | |
download | gcc-5cda1ab62a9d6a83c067a3f81bd54be0034d14e1.zip gcc-5cda1ab62a9d6a83c067a3f81bd54be0034d14e1.tar.gz gcc-5cda1ab62a9d6a83c067a3f81bd54be0034d14e1.tar.bz2 |
inclhack.def (endif_label): Add additional selector for more bogus stuff after #endif statements.
* fixinc/inclhack.def (endif_label): Add additional selector for
more bogus stuff after #endif statements.
* fixinc/inclhack.sh, fixinc/fixincl.x: Rebuilt.
From-SVN: r27486
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fixinc/fixincl.x | 2 | ||||
-rw-r--r-- | gcc/fixinc/inclhack.def | 8 | ||||
-rwxr-xr-x | gcc/fixinc/inclhack.sh | 2 |
4 files changed, 15 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 10f8e1f..4d818f6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Fri Jun 11 03:17:51 1999 Jeffrey A Law (law@cygnus.com) + + * fixinc/inclhack.def (endif_label): Add additional selector for + more bogus stuff after #endif statements. + * fixinc/inclhack.sh, fixinc/fixincl.x: Rebuilt. + Thu Jun 10 20:44:36 1999 Mumit Khan <khan@xraylith.wisc.edu> * i386/cygwin.h (SET_ASM_OP): Define. diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x index 8840413..be8a8f4 100644 --- a/gcc/fixinc/fixincl.x +++ b/gcc/fixinc/fixincl.x @@ -742,7 +742,7 @@ tSCC zEndif_LabelName[] = * content selection pattern - do fix if pattern found */ tSCC zEndif_LabelSelect0[] = - "^[ \t]*#[ \t]*endif[ \t]+[!-.0-z{|}~]"; + "^[ \t]*#[ \t]*endif[ \t]+[!-.0-z{|}~]|^[ \t]*#[ \t]*endif[ \t]+/[^*]"; #define ENDIF_LABEL_TEST_CT 1 #define ENDIF_LABEL_RE_CT 1 diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def index 7f7401e..2abc7bd 100644 --- a/gcc/fixinc/inclhack.def +++ b/gcc/fixinc/inclhack.def @@ -421,13 +421,19 @@ fix = { * match '#endif / * foo * /', but it also wont match * '#endif / done' either. * + * We have a second regexp in the selector to detect + * #endif followed by a / followed by anything other + * than a *. For example "#endif / * foo * /" or + * "#endif /% blah %/ which appear on OSF4.0A and AIX4.2 + * repsectively. + * * We use the pattern [!-.0-z{|}~] instead of [^/ \t] to match a noncomment * following #else or #endif because some buggy egreps think [^/] matches * newline, and they thus think `#else ' matches * `#e[ndiflse]*[ \t]+[^/ \t]'. * [!-.0-~] does not work properly on AIX 4.1. */ - select = "^[ \t]*#[ \t]*endif[ \t]+[!-.0-z\{\|\}\~]"; + select = "^[ \t]*#[ \t]*endif[ \t]+[!-.0-z\{\|\}\~]|^[ \t]*#[ \t]*endif[ \t]+/[^\*]"; /* * First, join the continued input lines. diff --git a/gcc/fixinc/inclhack.sh b/gcc/fixinc/inclhack.sh index b993c8b..983941f 100755 --- a/gcc/fixinc/inclhack.sh +++ b/gcc/fixinc/inclhack.sh @@ -841,7 +841,7 @@ s%^\([ ]*#[ ]*else\)[ ]*[^/ ].*%\1%' \ # # Fix 21: Endif_Label # - if ( test -n "`egrep '^[ ]*#[ ]*endif[ ]+[!-.0-z{|}~]' ${file}`" + if ( test -n "`egrep '^[ ]*#[ ]*endif[ ]+[!-.0-z{|}~]|^[ ]*#[ ]*endif[ ]+/[^*]' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} endif_label" |