Linas Vepstas <linas@linas.org>
* c-common.c: Use ISGRAPH, ISLOWER, toupper. * c-lex.c, cccp.c, cexp.c, cexp.y, cppexp.c, dwarf2out.c, genattr.c, genattrtab.c, genemit.c, genextract.c, genpeep.c, tree.c: Likewise. * system.h (IN_CTYPE_DOMAIN): Define to 1 if HOST_EBCDIC. * defaults.h (TARGET_ESC): Add default. From-SVN: r29192
This commit is contained in:
parent
a2b368b6e9
commit
f3ad1f9c0d
19 changed files with 428 additions and 418 deletions
|
@ -1,3 +1,11 @@
|
|||
Tue Sep 7 23:46:35 1999 Linas Vepstas <linas@linas.org>
|
||||
|
||||
* c-common.c: Use ISGRAPH, ISLOWER, toupper.
|
||||
* c-lex.c, cccp.c, cexp.c, cexp.y, cppexp.c, dwarf2out.c, genattr.c,
|
||||
genattrtab.c, genemit.c, genextract.c, genpeep.c, tree.c: Likewise.
|
||||
* system.h (IN_CTYPE_DOMAIN): Define to 1 if HOST_EBCDIC.
|
||||
* defaults.h (TARGET_ESC): Add default.
|
||||
|
||||
Tue Sep 7 23:36:59 1999 Linas Vepstas <linas@linas.org>
|
||||
|
||||
* configure.in: add i370-*-openedition, i370-*-mvs and
|
||||
|
|
|
@ -1795,7 +1795,7 @@ check_format_info (info, params)
|
|||
++fci;
|
||||
if (fci->format_chars == 0)
|
||||
{
|
||||
if (format_char >= 040 && format_char < 0177)
|
||||
if (ISGRAPH(format_char))
|
||||
warning ("unknown conversion type character `%c' in format",
|
||||
format_char);
|
||||
else
|
||||
|
|
|
@ -1015,7 +1015,7 @@ readescape (ignore_ptr)
|
|||
case 'E':
|
||||
if (pedantic)
|
||||
pedwarn ("non-ANSI-standard escape sequence, `\\%c'", c);
|
||||
return 033;
|
||||
return TARGET_ESC;
|
||||
|
||||
case '?':
|
||||
return c;
|
||||
|
@ -1053,7 +1053,7 @@ yyerror (msgid)
|
|||
error ("%s before string constant", string);
|
||||
else if (token_buffer[0] == '\'')
|
||||
error ("%s before character constant", string);
|
||||
else if (token_buffer[0] < 040 || (unsigned char) token_buffer[0] >= 0177)
|
||||
else if (!ISGRAPH(token_buffer[0]))
|
||||
error ("%s before character 0%o", string, (unsigned char) token_buffer[0]);
|
||||
else
|
||||
error ("%s before `%s'", string, token_buffer);
|
||||
|
|
755
gcc/c-parse.c
755
gcc/c-parse.c
File diff suppressed because it is too large
Load diff
|
@ -34,7 +34,6 @@ Boston, MA 02111-1307, USA. */
|
|||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include <setjmp.h>
|
||||
|
||||
#include "tree.h"
|
||||
#include "input.h"
|
||||
#include "c-lex.h"
|
||||
|
|
|
@ -10073,9 +10073,9 @@ initialize_char_syntax ()
|
|||
* refer to them.
|
||||
*/
|
||||
for (i = 'a'; i <= 'z'; i++) {
|
||||
is_idchar[i - 'a' + 'A'] = 1;
|
||||
is_idchar[toupper(i)] = 1;
|
||||
is_idchar[i] = 1;
|
||||
is_idstart[i - 'a' + 'A'] = 1;
|
||||
is_idstart[toupper(i)] = 1;
|
||||
is_idstart[i] = 1;
|
||||
}
|
||||
for (i = '0'; i <= '9'; i++)
|
||||
|
|
|
@ -1769,7 +1769,7 @@ parse_escape (string_ptr, result_mask)
|
|||
case 'E':
|
||||
if (pedantic)
|
||||
pedwarn ("non-ANSI-standard escape sequence, `\\%c'", c);
|
||||
return 033;
|
||||
return TARGET_ESC;
|
||||
case 'f':
|
||||
return TARGET_FF;
|
||||
case 'n':
|
||||
|
@ -2029,9 +2029,9 @@ initialize_random_junk ()
|
|||
* refer to them.
|
||||
*/
|
||||
for (i = 'a'; i <= 'z'; i++) {
|
||||
++is_idchar[i - 'a' + 'A'];
|
||||
++is_idchar[toupper(i)];
|
||||
++is_idchar[i];
|
||||
++is_idstart[i - 'a' + 'A'];
|
||||
++is_idstart[toupper(i)];
|
||||
++is_idstart[i];
|
||||
}
|
||||
for (i = '0'; i <= '9'; i++)
|
||||
|
|
|
@ -853,7 +853,7 @@ parse_escape (string_ptr, result_mask)
|
|||
case 'E':
|
||||
if (pedantic)
|
||||
pedwarn ("non-ANSI-standard escape sequence, `\\%c'", c);
|
||||
return 033;
|
||||
return TARGET_ESC;
|
||||
case 'f':
|
||||
return TARGET_FF;
|
||||
case 'n':
|
||||
|
@ -1113,9 +1113,9 @@ initialize_random_junk ()
|
|||
* refer to them.
|
||||
*/
|
||||
for (i = 'a'; i <= 'z'; i++) {
|
||||
++is_idchar[i - 'a' + 'A'];
|
||||
++is_idchar[toupper(i)];
|
||||
++is_idchar[i];
|
||||
++is_idstart[i - 'a' + 'A'];
|
||||
++is_idstart[toupper(i)];
|
||||
++is_idstart[i];
|
||||
}
|
||||
for (i = '0'; i <= '9'; i++)
|
||||
|
|
|
@ -532,7 +532,7 @@ cpp_parse_escape (pfile, string_ptr, result_mask)
|
|||
case 'E':
|
||||
if (CPP_OPTIONS (pfile)->pedantic)
|
||||
cpp_pedwarn (pfile, "non-ANSI-standard escape sequence, `\\%c'", c);
|
||||
return 033;
|
||||
return TARGET_ESC;
|
||||
case 'f':
|
||||
return TARGET_FF;
|
||||
case 'n':
|
||||
|
|
|
@ -169,3 +169,8 @@ do { fprintf (FILE, "\t%s\t", ASM_LONG); \
|
|||
#ifndef PROMOTE_PROTOTYPES
|
||||
#define PROMOTE_PROTOTYPES 0
|
||||
#endif
|
||||
|
||||
/* Define a default escape character; its different for EBCDIC. */
|
||||
#ifndef TARGET_ESC
|
||||
#define TARGET_ESC 033
|
||||
#endif
|
||||
|
|
|
@ -480,7 +480,7 @@ static void dwarf2out_frame_debug_expr PROTO((rtx, char *));
|
|||
register int c = p[i]; \
|
||||
if (c == '\"' || c == '\\') \
|
||||
putc ('\\', FILE); \
|
||||
if (c >= ' ' && c < 0177) \
|
||||
if (ISPRINT(c)) \
|
||||
putc (c, FILE); \
|
||||
else \
|
||||
{ \
|
||||
|
|
|
@ -87,8 +87,8 @@ write_upcase (str)
|
|||
char *str;
|
||||
{
|
||||
for (; *str; str++)
|
||||
if (*str >= 'a' && *str <= 'z')
|
||||
printf ("%c", *str - 'a' + 'A');
|
||||
if (ISLOWER(*str))
|
||||
printf ("%c", toupper(*str));
|
||||
else
|
||||
printf ("%c", *str);
|
||||
}
|
||||
|
@ -120,8 +120,8 @@ gen_attr (attr)
|
|||
write_upcase (XSTR (attr, 0));
|
||||
printf ("_");
|
||||
}
|
||||
else if (*p >= 'a' && *p <= 'z')
|
||||
printf ("%c", *p - 'a' + 'A');
|
||||
else if (ISLOWER(*p))
|
||||
printf ("%c", toupper(*p));
|
||||
else
|
||||
printf ("%c", *p);
|
||||
}
|
||||
|
|
|
@ -1357,8 +1357,8 @@ convert_const_symbol_ref (exp, attr)
|
|||
strcat (p, "_");
|
||||
strcat (p, XSTR (av->value, 0));
|
||||
for (; *p != '\0'; p++)
|
||||
if (*p >= 'a' && *p <= 'z')
|
||||
*p -= 'a' - 'A';
|
||||
if (ISLOWER(*p))
|
||||
*p = toupper (*p);
|
||||
|
||||
value = attr_rtx (SYMBOL_REF, string);
|
||||
RTX_UNCHANGING_P (value) = 1;
|
||||
|
@ -2841,8 +2841,8 @@ evaluate_eq_attr (exp, value, insn_code, insn_index)
|
|||
strcat (string, "_");
|
||||
strcat (string, XSTR (exp, 1));
|
||||
for (p = string; *p ; p++)
|
||||
if (*p >= 'a' && *p <= 'z')
|
||||
*p -= 'a' - 'A';
|
||||
if (ISLOWER(*p))
|
||||
*p = toupper (*p);
|
||||
|
||||
newexp = attr_rtx (EQ, value,
|
||||
attr_rtx (SYMBOL_REF,
|
||||
|
@ -5357,10 +5357,10 @@ write_upcase (str)
|
|||
char *str;
|
||||
{
|
||||
while (*str)
|
||||
if (*str < 'a' || *str > 'z')
|
||||
printf ("%c", *str++);
|
||||
if (ISLOWER(*str))
|
||||
printf ("%c", toupper(*str++));
|
||||
else
|
||||
printf ("%c", *str++ - 'a' + 'A');
|
||||
printf ("%c", *str++);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -139,8 +139,8 @@ print_code (code)
|
|||
register const char *p1;
|
||||
for (p1 = GET_RTX_NAME (code); *p1; p1++)
|
||||
{
|
||||
if (*p1 >= 'a' && *p1 <= 'z')
|
||||
putchar (*p1 + 'A' - 'a');
|
||||
if (ISLOWER(*p1))
|
||||
putchar (toupper(*p1));
|
||||
else
|
||||
putchar (*p1);
|
||||
}
|
||||
|
|
|
@ -321,9 +321,9 @@ print_path (path)
|
|||
|
||||
for (i = len - 1; i >=0 ; i--)
|
||||
{
|
||||
if (path[i] >= 'a' && path[i] <= 'z')
|
||||
if (ISLOWER(path[i]))
|
||||
printf ("XVECEXP (");
|
||||
else if (path[i] >= '0' && path[i] <= '9')
|
||||
else if (ISDIGIT(path[i]))
|
||||
printf ("XEXP (");
|
||||
else
|
||||
abort ();
|
||||
|
@ -333,9 +333,9 @@ print_path (path)
|
|||
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
if (path[i] >= 'a' && path[i] <= 'z')
|
||||
if (ISLOWER(path[i]))
|
||||
printf (", 0, %d)", path[i] - 'a');
|
||||
else if (path[i] >= '0' && path[i] <= '9')
|
||||
else if (ISDIGIT(path[i]))
|
||||
printf (", %d)", path[i] - '0');
|
||||
else
|
||||
abort ();
|
||||
|
|
|
@ -374,8 +374,8 @@ print_code (code)
|
|||
register const char *p1;
|
||||
for (p1 = GET_RTX_NAME (code); *p1; p1++)
|
||||
{
|
||||
if (*p1 >= 'a' && *p1 <= 'z')
|
||||
putchar (*p1 + 'A' - 'a');
|
||||
if (ISLOWER(*p1))
|
||||
putchar (toupper(*p1));
|
||||
else
|
||||
putchar (*p1);
|
||||
}
|
||||
|
|
|
@ -1640,8 +1640,8 @@ print_code (code)
|
|||
register const char *p1;
|
||||
for (p1 = GET_RTX_NAME (code); *p1; p1++)
|
||||
{
|
||||
if (*p1 >= 'a' && *p1 <= 'z')
|
||||
putchar (*p1 + 'A' - 'a');
|
||||
if (ISLOWER(*p1))
|
||||
putchar (toupper(*p1));
|
||||
else
|
||||
putchar (*p1);
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ extern int fputs_unlocked PROTO ((const char *, FILE *));
|
|||
character >= 128 which gets sign-extended to a negative value.
|
||||
The macro ISUPPER protects against this as well." */
|
||||
|
||||
#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
|
||||
#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) || defined(HOST_EBCDIC)
|
||||
# define IN_CTYPE_DOMAIN(c) 1
|
||||
#else
|
||||
# define IN_CTYPE_DOMAIN(c) isascii(c)
|
||||
|
@ -121,7 +121,6 @@ extern int fputs_unlocked PROTO ((const char *, FILE *));
|
|||
host does not conform to Posix. */
|
||||
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
||||
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
|
|
@ -4878,7 +4878,7 @@ get_file_function_name_long (type)
|
|||
if (p != first_global_object_name)
|
||||
{
|
||||
for (p = buf+11; *p; p++)
|
||||
if (! ((*p >= '0' && *p <= '9')
|
||||
if (! ( ISDIGIT(*p)
|
||||
#if 0 /* we always want labels, which are valid C++ identifiers (+ `$') */
|
||||
#ifndef ASM_IDENTIFY_GCC /* this is required if `.' is invalid -- k. raeburn */
|
||||
|| *p == '.'
|
||||
|
@ -4890,8 +4890,8 @@ get_file_function_name_long (type)
|
|||
#ifndef NO_DOT_IN_LABEL /* this for `.'; unlikely, but... */
|
||||
|| *p == '.'
|
||||
#endif
|
||||
|| (*p >= 'A' && *p <= 'Z')
|
||||
|| (*p >= 'a' && *p <= 'z')))
|
||||
|| ISUPPER(*p)
|
||||
|| ISLOWER(*p)))
|
||||
*p = '_';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue