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
3f259d6d
Commit
3f259d6d
authored
Oct 06, 1993
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let tm file define MAX_*_TYPE_SIZE if *_TYPE_SIZE depends upon target_flags
From-SVN: r5640
parent
176c9e6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
5 deletions
+21
-5
gcc/cexp.y
+21
-5
No files found.
gcc/cexp.y
View file @
3f259d6d
...
@@ -99,6 +99,22 @@ extern int traditional;
...
@@ -99,6 +99,22 @@ extern int traditional;
#define WCHAR_TYPE_SIZE INT_TYPE_SIZE
#define WCHAR_TYPE_SIZE INT_TYPE_SIZE
#endif
#endif
#ifndef MAX_CHAR_TYPE_SIZE
#define MAX_CHAR_TYPE_SIZE CHAR_TYPE_SIZE
#endif
#ifndef MAX_INT_TYPE_SIZE
#define MAX_INT_TYPE_SIZE INT_TYPE_SIZE
#endif
#ifndef MAX_LONG_TYPE_SIZE
#define MAX_LONG_TYPE_SIZE LONG_TYPE_SIZE
#endif
#ifndef MAX_WCHAR_TYPE_SIZE
#define MAX_WCHAR_TYPE_SIZE WCHAR_TYPE_SIZE
#endif
/* Yield nonzero if adding two numbers with A's and B's signs can yield a
/* Yield nonzero if adding two numbers with A's and B's signs can yield a
number with SUM's sign, where A, B, and SUM are all C integers. */
number with SUM's sign, where A, B, and SUM are all C integers. */
#define possible_sum_sign(a, b, sum) ((((a) ^ (b)) | ~ ((a) ^ (sum))) < 0)
#define possible_sum_sign(a, b, sum) ((((a) ^ (b)) | ~ ((a) ^ (sum))) < 0)
...
@@ -533,13 +549,13 @@ yylex ()
...
@@ -533,13 +549,13 @@ yylex ()
{
{
register int result = 0;
register int result = 0;
register num_chars = 0;
register num_chars = 0;
unsigned width = CHAR_TYPE_SIZE;
unsigned width =
MAX_
CHAR_TYPE_SIZE;
int max_chars;
int max_chars;
char *token_buffer;
char *token_buffer;
if (wide_flag)
if (wide_flag)
{
{
width = WCHAR_TYPE_SIZE;
width =
MAX_
WCHAR_TYPE_SIZE;
#ifdef MULTIBYTE_CHARS
#ifdef MULTIBYTE_CHARS
max_chars = MB_CUR_MAX;
max_chars = MB_CUR_MAX;
#else
#else
...
@@ -547,7 +563,7 @@ yylex ()
...
@@ -547,7 +563,7 @@ yylex ()
#endif
#endif
}
}
else
else
max_chars = LONG_TYPE_SIZE / width;
max_chars =
MAX_
LONG_TYPE_SIZE / width;
token_buffer = (char *) alloca (max_chars + 1);
token_buffer = (char *) alloca (max_chars + 1);
...
@@ -790,9 +806,9 @@ parse_escape (string_ptr)
...
@@ -790,9 +806,9 @@ parse_escape (string_ptr)
break;
break;
}
}
}
}
if ((i & ~((1 << CHAR_TYPE_SIZE) - 1)) != 0)
if ((i & ~((1 <<
MAX_
CHAR_TYPE_SIZE) - 1)) != 0)
{
{
i &= (1 << CHAR_TYPE_SIZE) - 1;
i &= (1 <<
MAX_
CHAR_TYPE_SIZE) - 1;
warning ("octal character constant does not fit in a byte");
warning ("octal character constant does not fit in a byte");
}
}
return i;
return i;
...
...
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