summaryrefslogtreecommitdiff
path: root/gcc/cccp.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1995-03-28 12:26:21 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1995-03-28 12:26:21 +0000
commitbc572ebe68afa149e20cc2bf09ed980563a883bd (patch)
tree25d9f32f67aefa9366b3a260a835bd9e445a5279 /gcc/cccp.c
parentc24b42efde5abd5f0ba82d71048ab820d3750483 (diff)
downloadgcc-bc572ebe68afa149e20cc2bf09ed980563a883bd.tar.gz
(do_xifdef, do_endif): Remove unnecessary pointer comparisons.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9237 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cccp.c')
-rw-r--r--gcc/cccp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index fb1e6fd64a0..b4b6ef94ec1 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -6953,10 +6953,10 @@ do_xifdef (buf, limit, op, keyword)
U_CHAR c = *p++;
if (is_space[c])
;
- /* ??? Why is the test with ip->bufp here? */
- /* ??? We don't handle \-n inside /-*. */
- /* ??? Comment handling in general could use a major cleanup. */
- else if (c == '/' && p != ip->bufp
+ /* Make no special provision for backslash-newline here; this is
+ slower if backslash-newlines are present, but it's correct,
+ and it's not worth it to tune for the rare backslash-newline. */
+ else if (c == '/'
&& (*p == '*' || (cplusplus_comments && *p == '/'))) {
/* Skip this comment. */
int junk = 0;
@@ -7414,7 +7414,7 @@ do_endif (buf, limit, op, keyword)
while (p != ep) {
U_CHAR c = *p++;
if (!is_space[c]) {
- if (c == '/' && p != ep
+ if (c == '/'
&& (*p == '*' || (cplusplus_comments && *p == '/'))) {
/* Skip this comment. */
int junk = 0;