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
8d9bfdc5
Commit
8d9bfdc5
authored
Jul 06, 1992
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes to support execution on 64-bit machines.
From-SVN: r1484
parent
9e4223f2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
159 additions
and
104 deletions
+159
-104
gcc/c-decl.c
+72
-56
gcc/c-lex.c
+34
-16
gcc/c-typeck.c
+24
-19
gcc/cccp.c
+29
-13
No files found.
gcc/c-decl.c
View file @
8d9bfdc5
...
@@ -41,9 +41,6 @@ enum decl_context
...
@@ -41,9 +41,6 @@ enum decl_context
BITFIELD
,
/* Likewise but with specified width */
BITFIELD
,
/* Likewise but with specified width */
TYPENAME
};
/* Typename (inside cast or sizeof) */
TYPENAME
};
/* Typename (inside cast or sizeof) */
#undef NULL
#define NULL 0
#ifndef CHAR_TYPE_SIZE
#ifndef CHAR_TYPE_SIZE
#define CHAR_TYPE_SIZE BITS_PER_UNIT
#define CHAR_TYPE_SIZE BITS_PER_UNIT
#endif
#endif
...
@@ -864,8 +861,8 @@ poplevel (keep, reverse, functionbody)
...
@@ -864,8 +861,8 @@ poplevel (keep, reverse, functionbody)
if
(
keep
||
functionbody
if
(
keep
||
functionbody
||
(
current_binding_level
->
keep_if_subblocks
&&
subblocks
!=
0
))
||
(
current_binding_level
->
keep_if_subblocks
&&
subblocks
!=
0
))
block
=
build_block
(
keep
?
decls
:
0
,
keep
?
tags
:
0
,
block
=
build_block
(
keep
?
decls
:
NULL_TREE
,
keep
?
tags
:
NULL_TREE
,
subblocks
,
0
,
0
);
subblocks
,
NULL_TREE
,
NULL_TREE
);
/* In each subblock, record that this is its superior. */
/* In each subblock, record that this is its superior. */
...
@@ -1108,7 +1105,7 @@ pushtag (name, type)
...
@@ -1108,7 +1105,7 @@ pushtag (name, type)
us a convenient place to record the "scope start" address for the
us a convenient place to record the "scope start" address for the
tagged type. */
tagged type. */
TYPE_STUB_DECL
(
type
)
=
pushdecl
(
build_decl
(
TYPE_DECL
,
NULL
,
type
));
TYPE_STUB_DECL
(
type
)
=
pushdecl
(
build_decl
(
TYPE_DECL
,
NULL
_TREE
,
type
));
}
}
/* Handle when a new declaration NEWDECL
/* Handle when a new declaration NEWDECL
...
@@ -1974,7 +1971,7 @@ implicitly_declare (functionid)
...
@@ -1974,7 +1971,7 @@ implicitly_declare (functionid)
/* This is a no-op in c-lang.c or something real in objc-actions.c. */
/* This is a no-op in c-lang.c or something real in objc-actions.c. */
maybe_objc_check_decl
(
decl
);
maybe_objc_check_decl
(
decl
);
rest_of_decl_compilation
(
decl
,
0
,
0
,
0
);
rest_of_decl_compilation
(
decl
,
NULL_PTR
,
0
,
0
);
if
(
warn_implicit
&&
implicit_warning
)
if
(
warn_implicit
&&
implicit_warning
)
warning
(
"implicit declaration of function `%s'"
,
warning
(
"implicit declaration of function `%s'"
,
...
@@ -2509,7 +2506,7 @@ init_decl_processing ()
...
@@ -2509,7 +2506,7 @@ init_decl_processing ()
endlink
=
tree_cons
(
NULL_TREE
,
void_type_node
,
NULL_TREE
);
endlink
=
tree_cons
(
NULL_TREE
,
void_type_node
,
NULL_TREE
);
void_ftype_any
void_ftype_any
=
build_function_type
(
void_type_node
,
0
);
=
build_function_type
(
void_type_node
,
NULL_TREE
);
double_ftype_double
double_ftype_double
=
build_function_type
(
double_type_node
,
=
build_function_type
(
double_type_node
,
...
@@ -2587,21 +2584,21 @@ init_decl_processing ()
...
@@ -2587,21 +2584,21 @@ init_decl_processing ()
/* ``integer_tpe_node'' misspelling corrected: North-Keys 30 Mar 91 */
/* ``integer_tpe_node'' misspelling corrected: North-Keys 30 Mar 91 */
builtin_function
(
"__builtin_constant_p"
,
builtin_function
(
"__builtin_constant_p"
,
build_function_type
(
integer_type_node
,
endlink
),
build_function_type
(
integer_type_node
,
endlink
),
BUILT_IN_CONSTANT_P
,
0
);
BUILT_IN_CONSTANT_P
,
NULL_PTR
);
builtin_function
(
"__builtin_return_address"
,
builtin_function
(
"__builtin_return_address"
,
build_function_type
(
integer_type_node
,
build_function_type
(
integer_type_node
,
tree_cons
(
NULL_TREE
,
tree_cons
(
NULL_TREE
,
unsigned_type_node
,
unsigned_type_node
,
endlink
)),
endlink
)),
BUILT_IN_RETURN_ADDRESS
,
0
);
BUILT_IN_RETURN_ADDRESS
,
NULL_PTR
);
builtin_function
(
"__builtin_frame_address"
,
builtin_function
(
"__builtin_frame_address"
,
build_function_type
(
integer_type_node
,
build_function_type
(
integer_type_node
,
tree_cons
(
NULL_TREE
,
tree_cons
(
NULL_TREE
,
unsigned_type_node
,
unsigned_type_node
,
endlink
)),
endlink
)),
BUILT_IN_FRAME_ADDRESS
,
0
);
BUILT_IN_FRAME_ADDRESS
,
NULL_PTR
);
builtin_function
(
"__builtin_alloca"
,
builtin_function
(
"__builtin_alloca"
,
build_function_type
(
ptr_type_node
,
build_function_type
(
ptr_type_node
,
...
@@ -2616,22 +2613,25 @@ init_decl_processing ()
...
@@ -2616,22 +2613,25 @@ init_decl_processing ()
tree_cons
(
NULL_TREE
,
tree_cons
(
NULL_TREE
,
sizetype
,
sizetype
,
endlink
)),
endlink
)),
BUILT_IN_ALLOCA
,
0
);
BUILT_IN_ALLOCA
,
NULL_PTR
);
/* Suppress error if redefined as a non-function. */
/* Suppress error if redefined as a non-function. */
DECL_BUILT_IN_NONANSI
(
temp
)
=
1
;
DECL_BUILT_IN_NONANSI
(
temp
)
=
1
;
temp
=
builtin_function
(
"_exit"
,
void_ftype_any
,
NOT_BUILT_IN
,
0
);
temp
=
builtin_function
(
"_exit"
,
void_ftype_any
,
NOT_BUILT_IN
,
NULL_PTR
);
TREE_THIS_VOLATILE
(
temp
)
=
1
;
TREE_THIS_VOLATILE
(
temp
)
=
1
;
TREE_SIDE_EFFECTS
(
temp
)
=
1
;
TREE_SIDE_EFFECTS
(
temp
)
=
1
;
/* Suppress error if redefined as a non-function. */
/* Suppress error if redefined as a non-function. */
DECL_BUILT_IN_NONANSI
(
temp
)
=
1
;
DECL_BUILT_IN_NONANSI
(
temp
)
=
1
;
}
}
builtin_function
(
"__builtin_abs"
,
int_ftype_int
,
BUILT_IN_ABS
,
0
);
builtin_function
(
"__builtin_abs"
,
int_ftype_int
,
BUILT_IN_ABS
,
NULL_PTR
);
builtin_function
(
"__builtin_fabs"
,
double_ftype_double
,
BUILT_IN_FABS
,
0
);
builtin_function
(
"__builtin_fabs"
,
double_ftype_double
,
BUILT_IN_FABS
,
builtin_function
(
"__builtin_labs"
,
long_ftype_long
,
BUILT_IN_LABS
,
0
);
NULL_PTR
);
builtin_function
(
"__builtin_ffs"
,
int_ftype_int
,
BUILT_IN_FFS
,
0
);
builtin_function
(
"__builtin_labs"
,
long_ftype_long
,
BUILT_IN_LABS
,
NULL_PTR
);
builtin_function
(
"__builtin_ffs"
,
int_ftype_int
,
BUILT_IN_FFS
,
NULL_PTR
);
builtin_function
(
"__builtin_saveregs"
,
default_function_type
,
builtin_function
(
"__builtin_saveregs"
,
default_function_type
,
BUILT_IN_SAVEREGS
,
0
);
BUILT_IN_SAVEREGS
,
NULL_PTR
);
/* EXPAND_BUILTIN_VARARGS is obsolete. */
/* EXPAND_BUILTIN_VARARGS is obsolete. */
#if 0
#if 0
builtin_function ("__builtin_varargs",
builtin_function ("__builtin_varargs",
...
@@ -2639,19 +2639,19 @@ init_decl_processing ()
...
@@ -2639,19 +2639,19 @@ init_decl_processing ()
tree_cons (NULL_TREE,
tree_cons (NULL_TREE,
integer_type_node,
integer_type_node,
endlink)),
endlink)),
BUILT_IN_VARARGS,
0
);
BUILT_IN_VARARGS,
NULL_PTR
);
#endif
#endif
builtin_function
(
"__builtin_classify_type"
,
default_function_type
,
builtin_function
(
"__builtin_classify_type"
,
default_function_type
,
BUILT_IN_CLASSIFY_TYPE
,
0
);
BUILT_IN_CLASSIFY_TYPE
,
NULL_PTR
);
builtin_function
(
"__builtin_next_arg"
,
builtin_function
(
"__builtin_next_arg"
,
build_function_type
(
ptr_type_node
,
endlink
),
build_function_type
(
ptr_type_node
,
endlink
),
BUILT_IN_NEXT_ARG
,
0
);
BUILT_IN_NEXT_ARG
,
NULL_PTR
);
builtin_function
(
"__builtin_args_info"
,
builtin_function
(
"__builtin_args_info"
,
build_function_type
(
integer_type_node
,
build_function_type
(
integer_type_node
,
tree_cons
(
NULL_TREE
,
tree_cons
(
NULL_TREE
,
integer_type_node
,
integer_type_node
,
endlink
)),
endlink
)),
BUILT_IN_ARGS_INFO
,
0
);
BUILT_IN_ARGS_INFO
,
NULL_PTR
);
/* Currently under experimentation. */
/* Currently under experimentation. */
builtin_function
(
"__builtin_memcpy"
,
memcpy_ftype
,
builtin_function
(
"__builtin_memcpy"
,
memcpy_ftype
,
...
@@ -2672,24 +2672,28 @@ init_decl_processing ()
...
@@ -2672,24 +2672,28 @@ init_decl_processing ()
However, honor the -fno-builtin option. */
However, honor the -fno-builtin option. */
if
(
!
flag_no_builtin
)
if
(
!
flag_no_builtin
)
{
{
builtin_function
(
"abs"
,
int_ftype_int
,
BUILT_IN_ABS
,
0
);
builtin_function
(
"abs"
,
int_ftype_int
,
BUILT_IN_ABS
,
NULL_PTR
);
builtin_function
(
"fabs"
,
double_ftype_double
,
BUILT_IN_FABS
,
0
);
builtin_function
(
"fabs"
,
double_ftype_double
,
BUILT_IN_FABS
,
NULL_PTR
);
builtin_function
(
"labs"
,
long_ftype_long
,
BUILT_IN_LABS
,
0
);
builtin_function
(
"labs"
,
long_ftype_long
,
BUILT_IN_LABS
,
NULL_PTR
);
builtin_function
(
"memcpy"
,
memcpy_ftype
,
BUILT_IN_MEMCPY
,
0
);
builtin_function
(
"memcpy"
,
memcpy_ftype
,
BUILT_IN_MEMCPY
,
NULL_PTR
);
builtin_function
(
"memcmp"
,
int_ftype_cptr_cptr_sizet
,
BUILT_IN_MEMCMP
,
0
);
builtin_function
(
"memcmp"
,
int_ftype_cptr_cptr_sizet
,
BUILT_IN_MEMCMP
,
builtin_function
(
"strcmp"
,
int_ftype_string_string
,
BUILT_IN_STRCMP
,
0
);
NULL_PTR
);
builtin_function
(
"strcpy"
,
string_ftype_ptr_ptr
,
BUILT_IN_STRCPY
,
0
);
builtin_function
(
"strcmp"
,
int_ftype_string_string
,
BUILT_IN_STRCMP
,
builtin_function
(
"strlen"
,
strlen_ftype
,
BUILT_IN_STRLEN
,
0
);
NULL_PTR
);
builtin_function
(
"sqrt"
,
double_ftype_double
,
BUILT_IN_FSQRT
,
0
);
builtin_function
(
"strcpy"
,
string_ftype_ptr_ptr
,
BUILT_IN_STRCPY
,
NULL_PTR
);
builtin_function
(
"strlen"
,
strlen_ftype
,
BUILT_IN_STRLEN
,
NULL_PTR
);
builtin_function
(
"sqrt"
,
double_ftype_double
,
BUILT_IN_FSQRT
,
NULL_PTR
);
/* Declare these functions volatile
/* Declare these functions volatile
to avoid spurious "control drops through" warnings. */
to avoid spurious "control drops through" warnings. */
/* Don't specify the argument types, to avoid errors
/* Don't specify the argument types, to avoid errors
from certain code which isn't valid in ANSI but which exists. */
from certain code which isn't valid in ANSI but which exists. */
temp
=
builtin_function
(
"abort"
,
void_ftype_any
,
NOT_BUILT_IN
,
0
);
temp
=
builtin_function
(
"abort"
,
void_ftype_any
,
NOT_BUILT_IN
,
NULL_PTR
);
TREE_THIS_VOLATILE
(
temp
)
=
1
;
TREE_THIS_VOLATILE
(
temp
)
=
1
;
TREE_SIDE_EFFECTS
(
temp
)
=
1
;
TREE_SIDE_EFFECTS
(
temp
)
=
1
;
temp
=
builtin_function
(
"exit"
,
void_ftype_any
,
NOT_BUILT_IN
,
0
);
temp
=
builtin_function
(
"exit"
,
void_ftype_any
,
NOT_BUILT_IN
,
NULL_PTR
);
TREE_THIS_VOLATILE
(
temp
)
=
1
;
TREE_THIS_VOLATILE
(
temp
)
=
1
;
TREE_SIDE_EFFECTS
(
temp
)
=
1
;
TREE_SIDE_EFFECTS
(
temp
)
=
1
;
}
}
...
@@ -2697,15 +2701,22 @@ init_decl_processing ()
...
@@ -2697,15 +2701,22 @@ init_decl_processing ()
#if 0
#if 0
/* Support for these has not been written in either expand_builtin
/* Support for these has not been written in either expand_builtin
or build_function_call. */
or build_function_call. */
builtin_function ("__builtin_div", default_ftype, BUILT_IN_DIV, 0);
builtin_function ("__builtin_div", default_ftype, BUILT_IN_DIV, NULL_PTR);
builtin_function ("__builtin_ldiv", default_ftype, BUILT_IN_LDIV, 0);
builtin_function ("__builtin_ldiv", default_ftype, BUILT_IN_LDIV, NULL_PTR);
builtin_function ("__builtin_ffloor", double_ftype_double, BUILT_IN_FFLOOR, 0);
builtin_function ("__builtin_ffloor", double_ftype_double, BUILT_IN_FFLOOR,
builtin_function ("__builtin_fceil", double_ftype_double, BUILT_IN_FCEIL, 0);
NULL_PTR);
builtin_function ("__builtin_fmod", double_ftype_double_double, BUILT_IN_FMOD, 0);
builtin_function ("__builtin_fceil", double_ftype_double, BUILT_IN_FCEIL,
builtin_function ("__builtin_frem", double_ftype_double_double, BUILT_IN_FREM, 0);
NULL_PTR);
builtin_function ("__builtin_memset", ptr_ftype_ptr_int_int, BUILT_IN_MEMSET, 0);
builtin_function ("__builtin_fmod", double_ftype_double_double,
builtin_function ("__builtin_getexp", double_ftype_double, BUILT_IN_GETEXP, 0);
BUILT_IN_FMOD, NULL_PTR);
builtin_function ("__builtin_getman", double_ftype_double, BUILT_IN_GETMAN, 0);
builtin_function ("__builtin_frem", double_ftype_double_double,
BUILT_IN_FREM, NULL_PTR);
builtin_function ("__builtin_memset", ptr_ftype_ptr_int_int,
BUILT_IN_MEMSET, NULL_PTR);
builtin_function ("__builtin_getexp", double_ftype_double, BUILT_IN_GETEXP,
NULL_PTR);
builtin_function ("__builtin_getman", double_ftype_double, BUILT_IN_GETMAN,
NULL_PTR);
#endif
#endif
/* Create the global bindings for __FUNCTION__ and __PRETTY_FUNCTION__. */
/* Create the global bindings for __FUNCTION__ and __PRETTY_FUNCTION__. */
...
@@ -2741,7 +2752,7 @@ builtin_function (name, type, function_code, library_name)
...
@@ -2741,7 +2752,7 @@ builtin_function (name, type, function_code, library_name)
DECL_BUILT_IN_NONANSI
(
decl
)
=
1
;
DECL_BUILT_IN_NONANSI
(
decl
)
=
1
;
if
(
library_name
)
if
(
library_name
)
DECL_ASSEMBLER_NAME
(
decl
)
=
get_identifier
(
library_name
);
DECL_ASSEMBLER_NAME
(
decl
)
=
get_identifier
(
library_name
);
make_decl_rtl
(
decl
,
0
,
1
);
make_decl_rtl
(
decl
,
NULL_PTR
,
1
);
pushdecl
(
decl
);
pushdecl
(
decl
);
if
(
function_code
!=
NOT_BUILT_IN
)
if
(
function_code
!=
NOT_BUILT_IN
)
{
{
...
@@ -3151,7 +3162,7 @@ finish_decl (decl, init, asmspec_tree)
...
@@ -3151,7 +3162,7 @@ finish_decl (decl, init, asmspec_tree)
{
{
/* This is a no-op in c-lang.c or something real in objc-actions.c. */
/* This is a no-op in c-lang.c or something real in objc-actions.c. */
maybe_objc_check_decl
(
decl
);
maybe_objc_check_decl
(
decl
);
rest_of_decl_compilation
(
decl
,
0
,
rest_of_decl_compilation
(
decl
,
NULL_PTR
,
current_binding_level
==
global_binding_level
,
current_binding_level
==
global_binding_level
,
0
);
0
);
}
}
...
@@ -3843,7 +3854,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
...
@@ -3843,7 +3854,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
/* Omit the arg types if -traditional, since the arg types
/* Omit the arg types if -traditional, since the arg types
and the list links might not be permanent. */
and the list links might not be permanent. */
type = build_function_type (type, flag_traditional ? 0 : arg_types);
type = build_function_type (type,
flag_traditional
? NULL_TREE : arg_types);
#endif
#endif
type
=
build_function_type
(
type
,
arg_types
);
type
=
build_function_type
(
type
,
arg_types
);
declarator
=
TREE_OPERAND
(
declarator
,
0
);
declarator
=
TREE_OPERAND
(
declarator
,
0
);
...
@@ -4551,7 +4564,7 @@ grokfield (filename, line, declarator, declspecs, width)
...
@@ -4551,7 +4564,7 @@ grokfield (filename, line, declarator, declspecs, width)
value
=
grokdeclarator
(
declarator
,
declspecs
,
width
?
BITFIELD
:
FIELD
,
0
);
value
=
grokdeclarator
(
declarator
,
declspecs
,
width
?
BITFIELD
:
FIELD
,
0
);
finish_decl
(
value
,
NULL
,
NULL
);
finish_decl
(
value
,
NULL
_TREE
,
NULL_TREE
);
DECL_INITIAL
(
value
)
=
width
;
DECL_INITIAL
(
value
)
=
width
;
return
value
;
return
value
;
...
@@ -4674,7 +4687,8 @@ finish_struct (t, fieldlist)
...
@@ -4674,7 +4687,8 @@ finish_struct (t, fieldlist)
error_with_decl
(
x
,
"zero width for bit-field `%s'"
);
error_with_decl
(
x
,
"zero width for bit-field `%s'"
);
DECL_INITIAL
(
x
)
=
NULL
;
DECL_INITIAL
(
x
)
=
NULL
;
}
}
else
if
(
width
>
TYPE_PRECISION
(
TREE_TYPE
(
x
)))
else
if
(
width
>
TYPE_PRECISION
(
TREE_TYPE
(
x
))
||
TREE_INT_CST_HIGH
(
DECL_INITIAL
(
x
))
!=
0
)
{
{
DECL_INITIAL
(
x
)
=
NULL
;
DECL_INITIAL
(
x
)
=
NULL
;
pedwarn_with_decl
(
x
,
"width of `%s' exceeds its type"
);
pedwarn_with_decl
(
x
,
"width of `%s' exceeds its type"
);
...
@@ -4829,7 +4843,7 @@ finish_struct (t, fieldlist)
...
@@ -4829,7 +4843,7 @@ finish_struct (t, fieldlist)
layout_decl
(
decl
,
0
);
layout_decl
(
decl
,
0
);
/* This is a no-op in c-lang.c or something real in objc-actions.c. */
/* This is a no-op in c-lang.c or something real in objc-actions.c. */
maybe_objc_check_decl
(
decl
);
maybe_objc_check_decl
(
decl
);
rest_of_decl_compilation
(
decl
,
0
,
toplevel
,
0
);
rest_of_decl_compilation
(
decl
,
NULL_PTR
,
toplevel
,
0
);
if
(
!
toplevel
)
if
(
!
toplevel
)
expand_decl
(
decl
);
expand_decl
(
decl
);
--
current_binding_level
->
n_incomplete
;
--
current_binding_level
->
n_incomplete
;
...
@@ -4919,8 +4933,8 @@ finish_enum (enumtype, values)
...
@@ -4919,8 +4933,8 @@ finish_enum (enumtype, values)
{
{
register
tree
pair
;
register
tree
pair
;
tree
minnode
=
0
,
maxnode
=
0
;
tree
minnode
=
0
,
maxnode
=
0
;
register
long
maxvalue
=
0
;
register
HOST_WIDE_INT
maxvalue
=
0
;
register
long
minvalue
=
0
;
register
HOST_WIDE_INT
minvalue
=
0
;
register
int
i
;
register
int
i
;
unsigned
precision
=
0
;
unsigned
precision
=
0
;
int
toplevel
=
global_binding_level
==
current_binding_level
;
int
toplevel
=
global_binding_level
==
current_binding_level
;
...
@@ -4956,8 +4970,8 @@ finish_enum (enumtype, values)
...
@@ -4956,8 +4970,8 @@ finish_enum (enumtype, values)
precision
=
TYPE_PRECISION
(
long_long_integer_type_node
);
precision
=
TYPE_PRECISION
(
long_long_integer_type_node
);
else
else
{
{
int
maxvalue
=
TREE_INT_CST_LOW
(
maxnode
);
maxvalue
=
TREE_INT_CST_LOW
(
maxnode
);
int
minvalue
=
TREE_INT_CST_LOW
(
minnode
);
minvalue
=
TREE_INT_CST_LOW
(
minnode
);
if
(
maxvalue
>
0
)
if
(
maxvalue
>
0
)
precision
=
floor_log2
(
maxvalue
)
+
1
;
precision
=
floor_log2
(
maxvalue
)
+
1
;
...
@@ -5065,7 +5079,7 @@ build_enumerator (name, value)
...
@@ -5065,7 +5079,7 @@ build_enumerator (name, value)
TREE_TYPE
(
value
)
=
integer_type_node
;
TREE_TYPE
(
value
)
=
integer_type_node
;
pushdecl
(
decl
);
pushdecl
(
decl
);
return
saveable_tree_cons
(
decl
,
value
,
NULL
);
return
saveable_tree_cons
(
decl
,
value
,
NULL
_TREE
);
}
}
/* Create the FUNCTION_DECL for a function definition.
/* Create the FUNCTION_DECL for a function definition.
...
@@ -5186,7 +5200,8 @@ start_function (declspecs, declarator, nested)
...
@@ -5186,7 +5200,8 @@ start_function (declspecs, declarator, nested)
if
(
TREE_CODE
(
restype
)
==
INTEGER_TYPE
if
(
TREE_CODE
(
restype
)
==
INTEGER_TYPE
&&
TYPE_PRECISION
(
restype
)
<
TYPE_PRECISION
(
integer_type_node
))
&&
TYPE_PRECISION
(
restype
)
<
TYPE_PRECISION
(
integer_type_node
))
restype
=
integer_type_node
;
restype
=
integer_type_node
;
DECL_RESULT
(
current_function_decl
)
=
build_decl
(
RESULT_DECL
,
0
,
restype
);
DECL_RESULT
(
current_function_decl
)
=
build_decl
(
RESULT_DECL
,
NULL_TREE
,
restype
);
if
(
!
nested
)
if
(
!
nested
)
/* Allocate further tree nodes temporarily during compilation
/* Allocate further tree nodes temporarily during compilation
...
@@ -5518,14 +5533,15 @@ store_parm_decls ()
...
@@ -5518,14 +5533,15 @@ store_parm_decls ()
for
(
parm
=
DECL_ARGUMENTS
(
fndecl
);
parm
;
parm
=
TREE_CHAIN
(
parm
))
for
(
parm
=
DECL_ARGUMENTS
(
fndecl
);
parm
;
parm
=
TREE_CHAIN
(
parm
))
{
{
type
=
perm_tree_cons
(
NULL
,
DECL_ARG_TYPE
(
parm
),
NULL
);
type
=
perm_tree_cons
(
NULL_TREE
,
DECL_ARG_TYPE
(
parm
),
NULL_TREE
);
if
(
last
)
if
(
last
)
TREE_CHAIN
(
last
)
=
type
;
TREE_CHAIN
(
last
)
=
type
;
else
else
actual
=
type
;
actual
=
type
;
last
=
type
;
last
=
type
;
}
}
type
=
perm_tree_cons
(
NULL
,
void_type_node
,
NULL
);
type
=
perm_tree_cons
(
NULL
_TREE
,
void_type_node
,
NULL_TREE
);
if
(
last
)
if
(
last
)
TREE_CHAIN
(
last
)
=
type
;
TREE_CHAIN
(
last
)
=
type
;
else
else
...
...
gcc/c-lex.c
View file @
8d9bfdc5
...
@@ -343,8 +343,21 @@ yyprint (file, yychar, yylval)
...
@@ -343,8 +343,21 @@ yyprint (file, yychar, yylval)
case
CONSTANT
:
case
CONSTANT
:
t
=
yylval
.
ttype
;
t
=
yylval
.
ttype
;
if
(
TREE_CODE
(
t
)
==
INTEGER_CST
)
if
(
TREE_CODE
(
t
)
==
INTEGER_CST
)
fprintf
(
file
,
" 0x%8x%8x"
,
TREE_INT_CST_HIGH
(
t
),
fprintf
(
file
,
TREE_INT_CST_LOW
(
t
));
#if HOST_BITS_PER_WIDE_INT == 64
#if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
" 0x%lx%016lx"
,
#else
" 0x%x%016x"
,
#endif
#else
#if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
" 0x%lx%08lx"
,
#else
" 0x%x%08x"
,
#endif
#endif
TREE_INT_CST_HIGH
(
t
),
TREE_INT_CST_LOW
(
t
));
break
;
break
;
}
}
}
}
...
@@ -1344,7 +1357,7 @@ yylex ()
...
@@ -1344,7 +1357,7 @@ yylex ()
{
{
set_float_handler
(
handler
);
set_float_handler
(
handler
);
value
=
REAL_VALUE_ATOF
(
token_buffer
);
value
=
REAL_VALUE_ATOF
(
token_buffer
);
set_float_handler
(
0
);
set_float_handler
(
NULL_PTR
);
}
}
#ifdef ERANGE
#ifdef ERANGE
if
(
errno
==
ERANGE
&&
!
flag_traditional
&&
pedantic
)
if
(
errno
==
ERANGE
&&
!
flag_traditional
&&
pedantic
)
...
@@ -1424,6 +1437,7 @@ yylex ()
...
@@ -1424,6 +1437,7 @@ yylex ()
else
else
{
{
tree
traditional_type
,
ansi_type
,
type
;
tree
traditional_type
,
ansi_type
,
type
;
HOST_WIDE_INT
high
,
low
;
int
spec_unsigned
=
0
;
int
spec_unsigned
=
0
;
int
spec_long
=
0
;
int
spec_long
=
0
;
int
spec_long_long
=
0
;
int
spec_long_long
=
0
;
...
@@ -1496,14 +1510,18 @@ yylex ()
...
@@ -1496,14 +1510,18 @@ yylex ()
/* This is simplified by the fact that our constant
/* This is simplified by the fact that our constant
is always positive. */
is always positive. */
/* The casts in the following statement should not be
needed, but they get around bugs in some C compilers. */
high
=
low
=
0
;
yylval
.
ttype
=
(
build_int_2
for
(
i
=
0
;
i
<
HOST_BITS_PER_WIDE_INT
/
HOST_BITS_PER_CHAR
;
i
++
)
((((
long
)
parts
[
3
]
<<
24
)
+
((
long
)
parts
[
2
]
<<
16
)
{
+
((
long
)
parts
[
1
]
<<
8
)
+
(
long
)
parts
[
0
]),
high
|=
((
HOST_WIDE_INT
)
parts
[
i
+
(
HOST_BITS_PER_WIDE_INT
(((
long
)
parts
[
7
]
<<
24
)
+
((
long
)
parts
[
6
]
<<
16
)
/
HOST_BITS_PER_CHAR
)]
+
((
long
)
parts
[
5
]
<<
8
)
+
(
long
)
parts
[
4
])));
<<
(
i
*
HOST_BITS_PER_CHAR
));
low
|=
(
HOST_WIDE_INT
)
parts
[
i
]
<<
(
i
*
HOST_BITS_PER_CHAR
);
}
yylval
.
ttype
=
build_int_2
(
low
,
high
);
/* If warn_traditional, calculate both the ANSI type and the
/* If warn_traditional, calculate both the ANSI type and the
traditional type, then see if they disagree.
traditional type, then see if they disagree.
...
@@ -1665,13 +1683,13 @@ yylex ()
...
@@ -1665,13 +1683,13 @@ yylex ()
if
(
TREE_UNSIGNED
(
char_type_node
)
if
(
TREE_UNSIGNED
(
char_type_node
)
||
((
result
>>
(
num_bits
-
1
))
&
1
)
==
0
)
||
((
result
>>
(
num_bits
-
1
))
&
1
)
==
0
)
yylval
.
ttype
yylval
.
ttype
=
build_int_2
(
result
&
((
unsigned
)
~
0
=
build_int_2
(
result
&
((
unsigned
HOST_WIDE_INT
)
~
0
>>
(
HOST_BITS_PER_INT
-
num_bits
)),
>>
(
HOST_BITS_PER_
WIDE_
INT
-
num_bits
)),
0
);
0
);
else
else
yylval
.
ttype
yylval
.
ttype
=
build_int_2
(
result
|
~
((
unsigned
)
~
0
=
build_int_2
(
result
|
~
((
unsigned
HOST_WIDE_INT
)
~
0
>>
(
HOST_BITS_PER_INT
-
num_bits
)),
>>
(
HOST_BITS_PER_
WIDE_
INT
-
num_bits
)),
-
1
);
-
1
);
}
}
else
else
...
@@ -1685,7 +1703,7 @@ yylex ()
...
@@ -1685,7 +1703,7 @@ yylex ()
||
(
num_chars
==
1
&&
token_buffer
[
1
]
!=
'\0'
))
||
(
num_chars
==
1
&&
token_buffer
[
1
]
!=
'\0'
))
{
{
wchar_t
wc
;
wchar_t
wc
;
(
void
)
mbtowc
(
NULL
,
NULL
,
0
);
(
void
)
mbtowc
(
NULL
_PTR
,
NULL_PTR
,
0
);
if
(
mbtowc
(
&
wc
,
token_buffer
+
1
,
num_chars
)
==
num_chars
)
if
(
mbtowc
(
&
wc
,
token_buffer
+
1
,
num_chars
)
==
num_chars
)
result
=
wc
;
result
=
wc
;
else
else
...
...
gcc/c-typeck.c
View file @
8d9bfdc5
...
@@ -287,7 +287,7 @@ common_type (t1, t2)
...
@@ -287,7 +287,7 @@ common_type (t1, t2)
newargs
=
0
;
newargs
=
0
;
for
(
i
=
0
;
i
<
len
;
i
++
)
for
(
i
=
0
;
i
<
len
;
i
++
)
newargs
=
tree_cons
(
0
,
0
,
newargs
);
newargs
=
tree_cons
(
NULL_TREE
,
NULL_TREE
,
newargs
);
n
=
newargs
;
n
=
newargs
;
...
@@ -1011,7 +1011,7 @@ build_component_ref (datum, component)
...
@@ -1011,7 +1011,7 @@ build_component_ref (datum, component)
{
{
if
(
TYPE_SIZE
(
type
)
==
0
)
if
(
TYPE_SIZE
(
type
)
==
0
)
{
{
incomplete_type_error
(
0
,
type
);
incomplete_type_error
(
NULL_TREE
,
type
);
return
error_mark_node
;
return
error_mark_node
;
}
}
...
@@ -2027,7 +2027,7 @@ convert_arguments (typelist, values, name)
...
@@ -2027,7 +2027,7 @@ convert_arguments (typelist, values, name)
parmval
=
default_conversion
(
parmval
);
parmval
=
default_conversion
(
parmval
);
#endif
#endif
}
}
result
=
tree_cons
(
0
,
parmval
,
result
);
result
=
tree_cons
(
NULL_TREE
,
parmval
,
result
);
}
}
else
if
(
TREE_CODE
(
TREE_TYPE
(
val
))
==
REAL_TYPE
else
if
(
TREE_CODE
(
TREE_TYPE
(
val
))
==
REAL_TYPE
&&
(
TYPE_PRECISION
(
TREE_TYPE
(
val
))
&&
(
TYPE_PRECISION
(
TREE_TYPE
(
val
))
...
@@ -3676,7 +3676,7 @@ build_c_cast (type, expr)
...
@@ -3676,7 +3676,7 @@ build_c_cast (type, expr)
name
=
""
;
name
=
""
;
return
digest_init
(
type
,
build_nt
(
CONSTRUCTOR
,
NULL_TREE
,
return
digest_init
(
type
,
build_nt
(
CONSTRUCTOR
,
NULL_TREE
,
build_tree_list
(
field
,
value
)),
build_tree_list
(
field
,
value
)),
0
,
0
,
0
,
name
);
NULL_PTR
,
0
,
0
,
name
);
}
}
error
(
"cast to union type from type not present in union"
);
error
(
"cast to union type from type not present in union"
);
return
error_mark_node
;
return
error_mark_node
;
...
@@ -4200,7 +4200,7 @@ store_init_value (decl, init)
...
@@ -4200,7 +4200,7 @@ store_init_value (decl, init)
/* Digest the specified initializer into an expression. */
/* Digest the specified initializer into an expression. */
value
=
digest_init
(
type
,
init
,
0
,
TREE_STATIC
(
decl
),
value
=
digest_init
(
type
,
init
,
NULL_PTR
,
TREE_STATIC
(
decl
),
TREE_STATIC
(
decl
)
||
pedantic
,
TREE_STATIC
(
decl
)
||
pedantic
,
IDENTIFIER_POINTER
(
DECL_NAME
(
decl
)));
IDENTIFIER_POINTER
(
DECL_NAME
(
decl
)));
...
@@ -4667,13 +4667,13 @@ digest_init (type, init, tail, require_constant, constructor_constant, ofwhat)
...
@@ -4667,13 +4667,13 @@ digest_init (type, init, tail, require_constant, constructor_constant, ofwhat)
}
}
if
(
raw_constructor
)
if
(
raw_constructor
)
result
=
process_init_constructor
(
type
,
inside_init
,
0
,
result
=
process_init_constructor
(
type
,
inside_init
,
NULL_PTR
,
require_constant
,
require_constant
,
constructor_constant
,
ofwhat
);
constructor_constant
,
ofwhat
);
else
if
(
tail
!=
0
)
else
if
(
tail
!=
0
)
{
{
*
tail
=
old_tail_contents
;
*
tail
=
old_tail_contents
;
result
=
process_init_constructor
(
type
,
0
,
tail
,
result
=
process_init_constructor
(
type
,
NULL_TREE
,
tail
,
require_constant
,
require_constant
,
constructor_constant
,
ofwhat
);
constructor_constant
,
ofwhat
);
}
}
...
@@ -4751,20 +4751,23 @@ digest_init (type, init, tail, require_constant, constructor_constant, ofwhat)
...
@@ -4751,20 +4751,23 @@ digest_init (type, init, tail, require_constant, constructor_constant, ofwhat)
{
{
if
(
raw_constructor
)
if
(
raw_constructor
)
return
process_init_constructor
(
type
,
inside_init
,
return
process_init_constructor
(
type
,
inside_init
,
0
,
constructor_constant
,
NULL_PTR
,
constructor_constant
,
constructor_constant
,
ofwhat
);
constructor_constant
,
ofwhat
);
else
if
(
tail
!=
0
)
else
if
(
tail
!=
0
)
{
{
*
tail
=
old_tail_contents
;
*
tail
=
old_tail_contents
;
return
process_init_constructor
(
type
,
0
,
tail
,
constructor_constant
,
return
process_init_constructor
(
type
,
NULL_TREE
,
tail
,
constructor_constant
,
constructor_constant
,
ofwhat
);
constructor_constant
,
ofwhat
);
}
}
else
if
(
flag_traditional
)
else
if
(
flag_traditional
)
/* Traditionally one can say `char x[100] = 0;'. */
/* Traditionally one can say `char x[100] = 0;'. */
return
process_init_constructor
(
type
,
return
process_init_constructor
(
type
,
build_nt
(
CONSTRUCTOR
,
0
,
build_nt
(
CONSTRUCTOR
,
NULL_TREE
,
tree_cons
(
0
,
inside_init
,
0
)),
tree_cons
(
NULL_TREE
,
0
,
constructor_constant
,
inside_init
,
NULL_TREE
)),
NULL_PTR
,
constructor_constant
,
constructor_constant
,
ofwhat
);
constructor_constant
,
ofwhat
);
}
}
...
@@ -4906,7 +4909,8 @@ process_init_constructor (type, init, elts, constant_value, constant_element,
...
@@ -4906,7 +4909,8 @@ process_init_constructor (type, init, elts, constant_value, constant_element,
TREE_VALUE
(
tail
),
&
tail1
,
TREE_VALUE
(
tail
),
&
tail1
,
/* Both of these are the same because
/* Both of these are the same because
a value here is an elt overall. */
a value here is an elt overall. */
constant_element
,
constant_element
,
0
);
constant_element
,
constant_element
,
NULL_PTR
);
});
});
if
(
tail1
!=
0
&&
TREE_CODE
(
tail1
)
!=
TREE_LIST
)
if
(
tail1
!=
0
&&
TREE_CODE
(
tail1
)
!=
TREE_LIST
)
...
@@ -4915,7 +4919,7 @@ process_init_constructor (type, init, elts, constant_value, constant_element,
...
@@ -4915,7 +4919,7 @@ process_init_constructor (type, init, elts, constant_value, constant_element,
{
{
error_init
(
error_init
(
"non-empty initializer for array%s of empty elements"
,
"non-empty initializer for array%s of empty elements"
,
" `%s'"
,
0
);
" `%s'"
,
NULL_PTR
);
/* Just ignore what we were supposed to use. */
/* Just ignore what we were supposed to use. */
tail1
=
0
;
tail1
=
0
;
}
}
...
@@ -5015,7 +5019,8 @@ process_init_constructor (type, init, elts, constant_value, constant_element,
...
@@ -5015,7 +5019,8 @@ process_init_constructor (type, init, elts, constant_value, constant_element,
push_member_name
(
IDENTIFIER_POINTER
(
DECL_NAME
(
field
)));
push_member_name
(
IDENTIFIER_POINTER
(
DECL_NAME
(
field
)));
next1
=
digest_init
(
TREE_TYPE
(
field
),
next1
=
digest_init
(
TREE_TYPE
(
field
),
TREE_VALUE
(
tail
),
&
tail1
,
TREE_VALUE
(
tail
),
&
tail1
,
constant_element
,
constant_element
,
0
);
constant_element
,
constant_element
,
NULL_PTR
);
});
});
if
(
tail1
!=
0
&&
TREE_CODE
(
tail1
)
!=
TREE_LIST
)
if
(
tail1
!=
0
&&
TREE_CODE
(
tail1
)
!=
TREE_LIST
)
abort
();
abort
();
...
@@ -5103,7 +5108,7 @@ process_init_constructor (type, init, elts, constant_value, constant_element,
...
@@ -5103,7 +5108,7 @@ process_init_constructor (type, init, elts, constant_value, constant_element,
push_member_name
(
IDENTIFIER_POINTER
(
DECL_NAME
(
field
)));
push_member_name
(
IDENTIFIER_POINTER
(
DECL_NAME
(
field
)));
next1
=
digest_init
(
TREE_TYPE
(
field
),
next1
=
digest_init
(
TREE_TYPE
(
field
),
TREE_VALUE
(
tail
),
&
tail1
,
TREE_VALUE
(
tail
),
&
tail1
,
constant_value
,
constant_element
,
0
);
constant_value
,
constant_element
,
NULL_PTR
);
});
});
if
(
tail1
!=
0
&&
TREE_CODE
(
tail1
)
!=
TREE_LIST
)
if
(
tail1
!=
0
&&
TREE_CODE
(
tail1
)
!=
TREE_LIST
)
abort
();
abort
();
...
@@ -5134,12 +5139,12 @@ process_init_constructor (type, init, elts, constant_value, constant_element,
...
@@ -5134,12 +5139,12 @@ process_init_constructor (type, init, elts, constant_value, constant_element,
if
(
TREE_CODE
(
type
)
==
UNION_TYPE
)
if
(
TREE_CODE
(
type
)
==
UNION_TYPE
)
{
{
pedwarn_init
(
"excess elements in union initializer%s"
,
pedwarn_init
(
"excess elements in union initializer%s"
,
" after `%s'"
,
0
);
" after `%s'"
,
NULL_PTR
);
}
}
else
else
{
{
pedwarn_init
(
"excess elements in aggregate initializer%s"
,
pedwarn_init
(
"excess elements in aggregate initializer%s"
,
" after `%s'"
,
0
);
" after `%s'"
,
NULL_PTR
);
}
}
}
}
...
@@ -5293,7 +5298,7 @@ c_expand_start_case (exp)
...
@@ -5293,7 +5298,7 @@ c_expand_start_case (exp)
exp
=
default_conversion
(
exp
);
exp
=
default_conversion
(
exp
);
type
=
TREE_TYPE
(
exp
);
type
=
TREE_TYPE
(
exp
);
index
=
get_unwidened
(
exp
,
0
);
index
=
get_unwidened
(
exp
,
NULL_TREE
);
/* We can't strip a conversion from a signed type to an unsigned,
/* We can't strip a conversion from a signed type to an unsigned,
because if we did, int_fits_type_p would do the wrong thing
because if we did, int_fits_type_p would do the wrong thing
when checking case values for being in range,
when checking case values for being in range,
...
...
gcc/cccp.c
View file @
8d9bfdc5
...
@@ -120,6 +120,14 @@ typedef struct { unsigned :16, :16, :16; } vms_ino_t;
...
@@ -120,6 +120,14 @@ typedef struct { unsigned :16, :16, :16; } vms_ino_t;
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
#endif
#ifndef NULL
#define NULL 0
#endif
#ifndef NULL_PTR
#define NULL_PTR (char *) NULL
#endif
/* Exported declarations. */
/* Exported declarations. */
char
*
xmalloc
();
char
*
xmalloc
();
...
@@ -1589,7 +1597,7 @@ main (argc, argv)
...
@@ -1589,7 +1597,7 @@ main (argc, argv)
perror_with_name
(
pend_files
[
i
]);
perror_with_name
(
pend_files
[
i
]);
return
FAILURE_EXIT_CODE
;
return
FAILURE_EXIT_CODE
;
}
}
finclude
(
fd
,
pend_files
[
i
],
&
outbuf
,
0
,
0
);
finclude
(
fd
,
pend_files
[
i
],
&
outbuf
,
0
,
NULL_PTR
);
}
}
no_output
--
;
no_output
--
;
...
@@ -1773,7 +1781,7 @@ main (argc, argv)
...
@@ -1773,7 +1781,7 @@ main (argc, argv)
perror_with_name
(
pend_includes
[
i
]);
perror_with_name
(
pend_includes
[
i
]);
return
FAILURE_EXIT_CODE
;
return
FAILURE_EXIT_CODE
;
}
}
finclude
(
fd
,
pend_includes
[
i
],
&
outbuf
,
0
,
0
);
finclude
(
fd
,
pend_includes
[
i
],
&
outbuf
,
0
,
NULL_PTR
);
}
}
/* Scan the input, processing macros and directives. */
/* Scan the input, processing macros and directives. */
...
@@ -3329,7 +3337,8 @@ handle_directive (ip, op)
...
@@ -3329,7 +3337,8 @@ handle_directive (ip, op)
case
'\"'
:
case
'\"'
:
{
{
register
U_CHAR
*
bp1
register
U_CHAR
*
bp1
=
skip_quoted_string
(
xp
-
1
,
bp
,
ip
->
lineno
,
0
,
0
,
0
);
=
skip_quoted_string
(
xp
-
1
,
bp
,
ip
->
lineno
,
NULL_PTR
,
NULL_PTR
,
NULL_PTR
);
while
(
xp
!=
bp1
)
while
(
xp
!=
bp1
)
if
(
*
xp
==
'\\'
)
{
if
(
*
xp
==
'\\'
)
{
if
(
*++
xp
!=
'\n'
)
if
(
*++
xp
!=
'\n'
)
...
@@ -4307,8 +4316,8 @@ check_preconditions (prec)
...
@@ -4307,8 +4316,8 @@ check_preconditions (prec)
HASHNODE
*
hp
;
HASHNODE
*
hp
;
prec
+=
6
;
prec
+=
6
;
mdef
=
create_definition
(
prec
,
lineend
,
0
);
mdef
=
create_definition
(
prec
,
lineend
,
NULL_PTR
);
if
(
mdef
.
defn
==
0
)
if
(
mdef
.
defn
==
0
)
abort
();
abort
();
...
@@ -4695,7 +4704,7 @@ create_definition (buf, limit, op)
...
@@ -4695,7 +4704,7 @@ create_definition (buf, limit, op)
if
(
is_hor_space
[
*
bp
])
if
(
is_hor_space
[
*
bp
])
++
bp
;
/* skip exactly one blank/tab char */
++
bp
;
/* skip exactly one blank/tab char */
/* now everything from bp before limit is the definition. */
/* now everything from bp before limit is the definition. */
defn
=
collect_expansion
(
bp
,
limit
,
-
1
,
0
);
defn
=
collect_expansion
(
bp
,
limit
,
-
1
,
NULL_PTR
);
defn
->
args
.
argnames
=
(
U_CHAR
*
)
""
;
defn
->
args
.
argnames
=
(
U_CHAR
*
)
""
;
}
}
...
@@ -5452,7 +5461,7 @@ read_token_list (bpp, limit, error_flag)
...
@@ -5452,7 +5461,7 @@ read_token_list (bpp, limit, error_flag)
break
;
break
;
bp
++
;
bp
++
;
}
else
if
(
*
bp
==
'"'
||
*
bp
==
'\''
)
}
else
if
(
*
bp
==
'"'
||
*
bp
==
'\''
)
bp
=
skip_quoted_string
(
bp
,
limit
,
0
,
0
,
0
,
&
eofp
);
bp
=
skip_quoted_string
(
bp
,
limit
,
0
,
NULL_PTR
,
NULL_PTR
,
&
eofp
);
else
else
while
(
!
is_hor_space
[
*
bp
]
&&
*
bp
!=
'('
&&
*
bp
!=
')'
while
(
!
is_hor_space
[
*
bp
]
&&
*
bp
!=
'('
&&
*
bp
!=
')'
&&
*
bp
!=
'"'
&&
*
bp
!=
'\''
&&
bp
!=
limit
)
&&
*
bp
!=
'"'
&&
*
bp
!=
'\''
&&
bp
!=
limit
)
...
@@ -5911,7 +5920,7 @@ do_if (buf, limit, op, keyword)
...
@@ -5911,7 +5920,7 @@ do_if (buf, limit, op, keyword)
FILE_BUF
*
ip
=
&
instack
[
indepth
];
FILE_BUF
*
ip
=
&
instack
[
indepth
];
value
=
eval_if_expression
(
buf
,
limit
-
buf
);
value
=
eval_if_expression
(
buf
,
limit
-
buf
);
conditional_skip
(
ip
,
value
==
0
,
T_IF
,
0
);
conditional_skip
(
ip
,
value
==
0
,
T_IF
,
NULL_PTR
);
return
0
;
return
0
;
}
}
...
@@ -6142,7 +6151,8 @@ skip_if_group (ip, any)
...
@@ -6142,7 +6151,8 @@ skip_if_group (ip, any)
break
;
break
;
case
'\"'
:
case
'\"'
:
case
'\''
:
case
'\''
:
bp
=
skip_quoted_string
(
bp
-
1
,
endb
,
ip
->
lineno
,
&
ip
->
lineno
,
0
,
0
);
bp
=
skip_quoted_string
(
bp
-
1
,
endb
,
ip
->
lineno
,
&
ip
->
lineno
,
NULL_PTR
,
NULL_PTR
);
break
;
break
;
case
'\\'
:
case
'\\'
:
/* Char after backslash loses its special meaning. */
/* Char after backslash loses its special meaning. */
...
@@ -6674,7 +6684,7 @@ skip_paren_group (ip)
...
@@ -6674,7 +6684,7 @@ skip_paren_group (ip)
case
'\''
:
case
'\''
:
{
{
int
eofp
=
0
;
int
eofp
=
0
;
p
=
skip_quoted_string
(
p
-
1
,
limit
,
0
,
0
,
0
,
&
eofp
);
p
=
skip_quoted_string
(
p
-
1
,
limit
,
0
,
NULL_PTR
,
NULL_PTR
,
&
eofp
);
if
(
eofp
)
if
(
eofp
)
return
ip
->
bufp
=
p
;
return
ip
->
bufp
=
p
;
}
}
...
@@ -6844,7 +6854,7 @@ macroexpand (hp, op)
...
@@ -6844,7 +6854,7 @@ macroexpand (hp, op)
parse_error
=
macarg
(
&
args
[
i
],
rest_args
);
parse_error
=
macarg
(
&
args
[
i
],
rest_args
);
}
}
else
else
parse_error
=
macarg
(
0
,
0
);
parse_error
=
macarg
(
NULL_PTR
,
0
);
if
(
parse_error
)
{
if
(
parse_error
)
{
error_with_line
(
line_for_error
(
start_line
),
parse_error
);
error_with_line
(
line_for_error
(
start_line
),
parse_error
);
break
;
break
;
...
@@ -7505,6 +7515,7 @@ delete_newlines (start, length)
...
@@ -7505,6 +7515,7 @@ delete_newlines (start, length)
void
void
error
(
msg
,
arg1
,
arg2
,
arg3
)
error
(
msg
,
arg1
,
arg2
,
arg3
)
char
*
msg
;
char
*
msg
;
char
*
arg1
,
*
arg2
,
*
arg3
;
{
{
int
i
;
int
i
;
FILE_BUF
*
ip
=
NULL
;
FILE_BUF
*
ip
=
NULL
;
...
@@ -7557,6 +7568,7 @@ error_from_errno (name)
...
@@ -7557,6 +7568,7 @@ error_from_errno (name)
void
void
warning
(
msg
,
arg1
,
arg2
,
arg3
)
warning
(
msg
,
arg1
,
arg2
,
arg3
)
char
*
msg
;
char
*
msg
;
char
*
arg1
,
*
arg2
,
*
arg3
;
{
{
int
i
;
int
i
;
FILE_BUF
*
ip
=
NULL
;
FILE_BUF
*
ip
=
NULL
;
...
@@ -7586,6 +7598,7 @@ static void
...
@@ -7586,6 +7598,7 @@ static void
error_with_line
(
line
,
msg
,
arg1
,
arg2
,
arg3
)
error_with_line
(
line
,
msg
,
arg1
,
arg2
,
arg3
)
int
line
;
int
line
;
char
*
msg
;
char
*
msg
;
char
*
arg1
,
*
arg2
,
*
arg3
;
{
{
int
i
;
int
i
;
FILE_BUF
*
ip
=
NULL
;
FILE_BUF
*
ip
=
NULL
;
...
@@ -7610,6 +7623,7 @@ error_with_line (line, msg, arg1, arg2, arg3)
...
@@ -7610,6 +7623,7 @@ error_with_line (line, msg, arg1, arg2, arg3)
void
void
pedwarn
(
msg
,
arg1
,
arg2
,
arg3
)
pedwarn
(
msg
,
arg1
,
arg2
,
arg3
)
char
*
msg
;
char
*
msg
;
char
*
arg1
,
*
arg2
,
*
arg3
;
{
{
if
(
pedantic_errors
)
if
(
pedantic_errors
)
error
(
msg
,
arg1
,
arg2
,
arg3
);
error
(
msg
,
arg1
,
arg2
,
arg3
);
...
@@ -7625,6 +7639,7 @@ pedwarn_with_file_and_line (file, line, msg, arg1, arg2, arg3)
...
@@ -7625,6 +7639,7 @@ pedwarn_with_file_and_line (file, line, msg, arg1, arg2, arg3)
char
*
file
;
char
*
file
;
int
line
;
int
line
;
char
*
msg
;
char
*
msg
;
char
*
arg1
,
*
arg2
,
*
arg3
;
{
{
int
i
;
int
i
;
if
(
!
pedantic_errors
&&
inhibit_warnings
)
if
(
!
pedantic_errors
&&
inhibit_warnings
)
...
@@ -8001,7 +8016,8 @@ dump_defn_1 (base, start, length, of)
...
@@ -8001,7 +8016,8 @@ dump_defn_1 (base, start, length, of)
if
(
*
p
!=
'\n'
)
if
(
*
p
!=
'\n'
)
putc
(
*
p
,
of
);
putc
(
*
p
,
of
);
else
if
(
*
p
==
'\"'
||
*
p
==
'\''
)
{
else
if
(
*
p
==
'\"'
||
*
p
==
'\''
)
{
U_CHAR
*
p1
=
skip_quoted_string
(
p
,
limit
,
0
,
0
,
0
,
0
);
U_CHAR
*
p1
=
skip_quoted_string
(
p
,
limit
,
0
,
NULL_PTR
,
NULL_PTR
,
NULL_PTR
);
fwrite
(
p
,
p1
-
p
,
1
,
of
);
fwrite
(
p
,
p1
-
p
,
1
,
of
);
p
=
p1
-
1
;
p
=
p1
-
1
;
}
}
...
@@ -8314,7 +8330,7 @@ make_assertion (option, str)
...
@@ -8314,7 +8330,7 @@ make_assertion (option, str)
/* pass NULL as output ptr to do_define since we KNOW it never
/* pass NULL as output ptr to do_define since we KNOW it never
does any output.... */
does any output.... */
do_assert
(
buf
,
buf
+
strlen
(
buf
)
,
NULL
,
kt
);
do_assert
(
buf
,
buf
+
strlen
(
buf
)
,
NULL
_PTR
,
kt
);
--
indepth
;
--
indepth
;
}
}
...
...
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