This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
egcs/gcc/cp patches for IBM OS/390 OpenEdition
- To: egcs-patches at cygnus dot com
- Subject: egcs/gcc/cp patches for IBM OS/390 OpenEdition
- From: David Pitts <dpitts at pullman dot cozx dot com>
- Date: Tue, 10 Nov 1998 12:47:07 -0700 (MST)
Thse patches provide IBM OS/390 OpenEdition (USS) support and native
compilation.
o Change ASCII compares to allow for EBCDIC collating sequence. There
are other character between 'I' & 'J' and 'R' & 'S' in EBCDIC.
o Correct the DEMANGLER_PROG link to put the "-o $@" as the first
arguments to make the native IBM compiler happy.
o Change __STDC__ to USE_STDARGS to force the usage <stdarg.h>.
The native IBM compiler does not set __STDC__ nor allow its setting
by the user. So, I added the USE_STDARGS to force it.
o Added the TARGET_ESC definition to allow the usage of the EBCDIC
escape, which is different from the ASCII escape.
1998-11-09 Dave Pitts dpitts@cozx.com
* Make-lang.in (DEMANGLER_PROG): Move the output argumnts to the first position.
* errfn.c (cp_thing): Use USE_STDARGS instead of __STDC__.
(check_newline): Use ISALPHA.
(readescape): Use TARGET_ESC & ISGRAPH.
(yyerror): Use ISGRAPH.
* tree.c (build_min_nt): Use USE_STDARGS instead of __STDC__.
(build_min): Likewise.
*** Make-lang.in.orig Tue Oct 13 16:15:55 1998
--- Make-lang.in Tue Oct 13 16:16:28 1998
*************** cxxmain.o: $(srcdir)/../libiberty/cplus-
*** 110,116 ****
-DVERSION=\"$(version)\" cxxmain.c
$(DEMANGLER_PROG): cxxmain.o underscore.o getopt.o getopt1.o $(LIBDEPS)
! $(CC) $(ALL_CFLAGS) $(LDFLAGS) $(LIBS) -o $@ \
cxxmain.o underscore.o getopt.o getopt1.o
CXX_SRCS = $(srcdir)/cp/call.c $(srcdir)/cp/decl2.c \
--- 110,116 ----
-DVERSION=\"$(version)\" cxxmain.c
$(DEMANGLER_PROG): cxxmain.o underscore.o getopt.o getopt1.o $(LIBDEPS)
! $(CC) -o $@ $(ALL_CFLAGS) $(LDFLAGS) $(LIBS) \
cxxmain.o underscore.o getopt.o getopt1.o
CXX_SRCS = $(srcdir)/cp/call.c $(srcdir)/cp/decl2.c \
*** errfn.c.orig Thu Sep 24 15:22:15 1998
--- errfn.c Thu Sep 24 15:23:32 1998
*************** cp_thing (errfn, atarg1, format, ap)
*** 197,203 ****
}
! #ifdef __STDC__
#define DECLARE(name) void name (const char *format, ...)
#define INIT va_start (ap, format)
#else
--- 197,203 ----
}
! #ifdef USE_STDARGS
#define DECLARE(name) void name (const char *format, ...)
#define INIT va_start (ap, format)
#else
*** lex.c.orig Thu Sep 24 15:18:45 1998
--- lex.c Thu Sep 24 15:21:01 1998
*************** check_newline ()
*** 2285,2291 ****
it and ignore it; otherwise, ignore the line, with an error
if the word isn't `pragma'. */
! if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
{
if (c == 'p')
{
--- 2285,2291 ----
it and ignore it; otherwise, ignore the line, with an error
if the word isn't `pragma'. */
! if (ISALPHA(c))
{
if (c == 'p')
{
*************** readescape (ignore_ptr)
*** 2754,2760 ****
case 'E':
if (pedantic)
pedwarn ("non-ANSI-standard escape sequence, `\\%c'", c);
! return 033;
case '?':
return c;
--- 2754,2760 ----
case 'E':
if (pedantic)
pedwarn ("non-ANSI-standard escape sequence, `\\%c'", c);
! return TARGET_ESC;
case '?':
return c;
*************** readescape (ignore_ptr)
*** 2769,2775 ****
pedwarn ("unknown escape sequence `\\%c'", c);
return c;
}
! if (c >= 040 && c < 0177)
pedwarn ("unknown escape sequence `\\%c'", c);
else
pedwarn ("unknown escape sequence: `\\' followed by char code 0x%x", c);
--- 2769,2775 ----
pedwarn ("unknown escape sequence `\\%c'", c);
return c;
}
! if (ISGRAPH(c))
pedwarn ("unknown escape sequence `\\%c'", c);
else
pedwarn ("unknown escape sequence: `\\' followed by char code 0x%x", c);
*************** yyerror (string)
*** 4749,4755 ****
strcat (buf, " before string constant");
else if (token_buffer[0] == '\'')
strcat (buf, " before character constant");
! else if (token_buffer[0] < 040 || (unsigned char) token_buffer[0] >= 0177)
sprintf (buf + strlen (buf), " before character 0%o",
(unsigned char) token_buffer[0]);
else
--- 4749,4755 ----
strcat (buf, " before string constant");
else if (token_buffer[0] == '\'')
strcat (buf, " before character constant");
! else if (!ISGRAPH(token_buffer[0]))
sprintf (buf + strlen (buf), " before character 0%o",
(unsigned char) token_buffer[0]);
else
*** tree.c.orig Thu Sep 24 15:23:42 1998
--- tree.c Thu Sep 24 15:24:22 1998
*************** break_out_target_exprs (t)
*** 2218,2224 ****
tree
build_min_nt VPROTO((enum tree_code code, ...))
{
! #ifndef __STDC__
enum tree_code code;
#endif
register struct obstack *ambient_obstack = expression_obstack;
--- 2218,2224 ----
tree
build_min_nt VPROTO((enum tree_code code, ...))
{
! #ifndef USE_STDARGS
enum tree_code code;
#endif
register struct obstack *ambient_obstack = expression_obstack;
*************** build_min_nt VPROTO((enum tree_code code
*** 2229,2235 ****
VA_START (p, code);
! #ifndef __STDC__
code = va_arg (p, enum tree_code);
#endif
--- 2229,2235 ----
VA_START (p, code);
! #ifndef USE_STDARGS
code = va_arg (p, enum tree_code);
#endif
*************** build_min_nt VPROTO((enum tree_code code
*** 2256,2262 ****
tree
build_min VPROTO((enum tree_code code, tree tt, ...))
{
! #ifndef __STDC__
enum tree_code code;
tree tt;
#endif
--- 2256,2262 ----
tree
build_min VPROTO((enum tree_code code, tree tt, ...))
{
! #ifndef USE_STDARGS
enum tree_code code;
tree tt;
#endif
*************** build_min VPROTO((enum tree_code code, t
*** 2268,2274 ****
VA_START (p, tt);
! #ifndef __STDC__
code = va_arg (p, enum tree_code);
tt = va_arg (p, tree);
#endif
--- 2268,2274 ----
VA_START (p, tt);
! #ifndef USE_STDARGS
code = va_arg (p, enum tree_code);
tt = va_arg (p, tree);
#endif
--
Dave Pitts PULLMAN: Travel and sleep in safety and comfort.
dpitts@cozx.com My other RV IS a Pullman (Colorado Pine).
http://www.cozx.com/~dpitts