Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
c5168e64
Commit
c5168e64
authored
Sep 02, 1998
by
Nick Clifton
Committed by
Nick Clifton
Sep 02, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change HANDLE_PRAGMA macro so that it supports USE_CPPLIB
From-SVN: r22167
parent
ae4d12ca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
4 deletions
+47
-4
gcc/ch/ChangeLog
+9
-0
gcc/ch/lex.c
+38
-4
No files found.
gcc/ch/ChangeLog
View file @
c5168e64
Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
* lex.c (check_newline): Change how HANDLE_PRAGMA is called.
Generate warning messages if unknown pragmas are encountered.
(pragma_getc): New function: retrieves characters from the
input stream. Defined when HANDLE_PRAGMA is defined.
(pragma_ungetc): New function: replaces characters back into the
input stream. Defined when HANDLE_PRAGMA is defined.
Mon Aug 31 15:35:16 1998 Dave Brolley <brolley@cygnus.com>
* decl.c (layout_chill_variants): Calculate nlables properly.
...
...
gcc/ch/lex.c
View file @
c5168e64
/* Lexical analyzer for GNU CHILL. -*- C -*-
Copyright (C) 1992, 93, 1994 Free Software Foundation, Inc.
Copyright (C) 1992, 93, 1994
, 1998
Free Software Foundation, Inc.
This file is part of GNU CC.
...
...
@@ -1495,6 +1495,22 @@ getlc (file)
return
c
;
}
#if defined HANDLE_PRAGMA
/* Local versions of these macros, that can be passed as function pointers. */
static
int
pragma_getc
()
{
return
getc
(
finput
);
}
static
void
pragma_ungetc
(
arg
)
int
arg
;
{
ungetc
(
arg
,
finput
);
}
#endif
/* HANDLE_PRAGMA */
/* At the beginning of a line, increment the line number and process
any #-directive on this line. If the line is a #-directive, read
the entire line and return a newline. Otherwise, return the line's
...
...
@@ -1553,10 +1569,28 @@ check_newline ()
&&
(
isspace
(
c
=
getlc
(
finput
))))
{
#ifdef HANDLE_PRAGMA
return
HANDLE_PRAGMA
(
finput
,
c
);
#else
goto
skipline
;
static
char
buffer
[
128
];
char
*
buff
=
buffer
;
/* Read the pragma name into a buffer. */
while
(
isspace
(
c
=
getlc
(
finput
)))
continue
;
do
{
*
buff
++
=
c
;
c
=
getlc
(
finput
);
}
while
(
c
!=
EOF
&&
!
isspace
(
c
)
&&
c
!=
'\n'
&&
buff
<
buffer
+
128
);
pragma_ungetc
(
c
);
*
--
buff
=
0
;
(
void
)
HANDLE_PRAGMA
(
pragma_getc
,
pragma_ungetc
,
buffer
);
#endif
/* HANDLE_PRAGMA */
goto
skipline
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment