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
9373164a
Commit
9373164a
authored
Oct 31, 2003
by
R. Kelley Cook
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
C90 prototype updates.
From-SVN: r73113
parent
6587cd2b
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
701 additions
and
1092 deletions
+701
-1092
gcc/ChangeLog
+6
-1
gcc/ada/ChangeLog
+8
-0
gcc/ada/adadecode.c
+8
-18
gcc/ada/adaint.c
+10
-11
gcc/ada/argv.c
+6
-12
gcc/ada/aux-io.c
+14
-15
gcc/ada/cal.c
+1
-1
gcc/ada/cio.c
+7
-12
gcc/ada/cstreams.c
+4
-8
gcc/ada/ctrl_c.c
+2
-2
gcc/ada/cuintp.c
+1
-3
gcc/ada/decl.c
+94
-157
gcc/ada/errno.c
+2
-3
gcc/ada/exit.c
+1
-2
gcc/ada/expect.c
+4
-4
gcc/ada/final.c
+1
-1
gcc/ada/gmem.c
+2
-3
gcc/ada/gnatbl.c
+6
-11
gcc/ada/init.c
+91
-129
gcc/ada/misc.c
+3
-3
gcc/ada/mkdir.c
+1
-2
gcc/ada/raise.c
+42
-63
gcc/ada/socket.c
+14
-27
gcc/ada/sysdep.c
+42
-64
gcc/ada/targtyps.c
+19
-19
gcc/ada/tb-alvms.c
+5
-6
gcc/ada/tb-alvxw.c
+34
-58
gcc/ada/tracebak.c
+8
-9
gcc/ada/trans.c
+83
-138
gcc/ada/utils.c
+111
-193
gcc/ada/utils2.c
+54
-85
gcc/value-prof.c
+1
-1
gcc/web.c
+16
-31
No files found.
gcc/ChangeLog
View file @
9373164a
2003-10-30 Kelley Cook <kcook@gcc.gnu.org>
* value-prof.c, web.c: Update to C90.
2003-10-30 Eric Christopher <echristo@redhat.com>
2003-10-30 Eric Christopher <echristo@redhat.com>
* function.c (purge_addressof_1): Add case for REG_RETVAL
* function.c (purge_addressof_1): Add case for REG_RETVAL
...
@@ -16,7 +20,8 @@
...
@@ -16,7 +20,8 @@
* real.c (encode_ieee_extended): Initialize whole array.
* real.c (encode_ieee_extended): Initialize whole array.
* reg-stack.c (move_for_stack_reg0: Use always XFmode.
* reg-stack.c (move_for_stack_reg0: Use always XFmode.
* i386-modes.def: Change definitions of TFmode and XFmode.
* i386-modes.def: Change definitions of TFmode and XFmode.
* i386.c (classify_argument): Rename TFmodes to XFmodes; add new TFmode code.
* i386.c (classify_argument): Rename TFmodes to XFmodes; add new TFmode
code.
(construct_container): Allow constructing of TFmode integer containers.
(construct_container): Allow constructing of TFmode integer containers.
(ix86_return_in_memory): XFmode is not returned in memory.
(ix86_return_in_memory): XFmode is not returned in memory.
(init_ext_80387_constants): Always use XFmode.
(init_ext_80387_constants): Always use XFmode.
...
...
gcc/ada/ChangeLog
View file @
9373164a
2003
-
10
-
30
Kelley
Cook
<
kcook
@
gcc
.
gnu
.
org
>
*
adadecode
.
c
,
adaint
.
c
,
argv
.
c
,
aux
-
io
.
c
,
cal
.
c
,
cio
.
c
,
cstreams
.
c
,
ctrl_c
.
c
,
cuintp
.
c
,
decl
.
c
,
errno
.
c
,
exit
.
c
,
expect
.
c
,
final
.
c
,
gigi
.
h
,
gmem
.
c
,
gnatbl
.
c
,
init
.
c
,
misc
.
c
,
mkdir
.
c
,
raise
.
c
,
socket
.
c
,
sysdep
.
c
,
sysdep
.
c
,
targtyps
.
c
,
tb
-
alvms
.
c
,
tb
-
alvxw
.
c
,
tracebak
.
c
,
trans
.
c
,
utils
.
c
,
utils2
.
c
:
Convert
function
prototypes
to
C90
.
2003
-
10
-
30
Vasiliy
Fofanov
<
fofanov
@
act
-
europe
.
fr
>
2003
-
10
-
30
Vasiliy
Fofanov
<
fofanov
@
act
-
europe
.
fr
>
*
3
vtrasym
.
adb
:
*
3
vtrasym
.
adb
:
...
...
gcc/ada/adadecode.c
View file @
9373164a
...
@@ -41,9 +41,9 @@
...
@@ -41,9 +41,9 @@
#include "ctype.h"
#include "ctype.h"
#include "adadecode.h"
#include "adadecode.h"
static
void
add_verbose
PARAMS
((
const
char
*
,
char
*
)
);
static
void
add_verbose
(
const
char
*
,
char
*
);
static
int
has_prefix
PARAMS
((
const
char
*
,
const
char
*
)
);
static
int
has_prefix
(
const
char
*
,
const
char
*
);
static
int
has_suffix
PARAMS
((
const
char
*
,
const
char
*
)
);
static
int
has_suffix
(
const
char
*
,
const
char
*
);
/* This is a safe version of strcpy that can be used with overlapped
/* This is a safe version of strcpy that can be used with overlapped
pointers. Does nothing if s2 <= s1. */
pointers. Does nothing if s2 <= s1. */
...
@@ -55,9 +55,7 @@ static int verbose_info;
...
@@ -55,9 +55,7 @@ static int verbose_info;
/* Add TEXT to end of ADA_NAME, putting a leading " (" or ", ", depending
/* Add TEXT to end of ADA_NAME, putting a leading " (" or ", ", depending
on VERBOSE_INFO. */
on VERBOSE_INFO. */
static
void
add_verbose
(
text
,
ada_name
)
static
void
add_verbose
(
const
char
*
text
,
char
*
ada_name
)
const
char
*
text
;
char
*
ada_name
;
{
{
strcat
(
ada_name
,
verbose_info
?
", "
:
" ("
);
strcat
(
ada_name
,
verbose_info
?
", "
:
" ("
);
strcat
(
ada_name
,
text
);
strcat
(
ada_name
,
text
);
...
@@ -68,9 +66,7 @@ static void add_verbose (text, ada_name)
...
@@ -68,9 +66,7 @@ static void add_verbose (text, ada_name)
/* Returns 1 if NAME starts with PREFIX. */
/* Returns 1 if NAME starts with PREFIX. */
static
int
static
int
has_prefix
(
name
,
prefix
)
has_prefix
(
const
char
*
name
,
const
char
*
prefix
)
const
char
*
name
;
const
char
*
prefix
;
{
{
return
strncmp
(
name
,
prefix
,
strlen
(
prefix
))
==
0
;
return
strncmp
(
name
,
prefix
,
strlen
(
prefix
))
==
0
;
}
}
...
@@ -78,9 +74,7 @@ has_prefix (name, prefix)
...
@@ -78,9 +74,7 @@ has_prefix (name, prefix)
/* Returns 1 if NAME ends with SUFFIX. */
/* Returns 1 if NAME ends with SUFFIX. */
static
int
static
int
has_suffix
(
name
,
suffix
)
has_suffix
(
const
char
*
name
,
const
char
*
suffix
)
const
char
*
name
;
const
char
*
suffix
;
{
{
int
nlen
=
strlen
(
name
);
int
nlen
=
strlen
(
name
);
int
slen
=
strlen
(
suffix
);
int
slen
=
strlen
(
suffix
);
...
@@ -147,10 +141,7 @@ ostrcpy (char *s1, char *s2)
...
@@ -147,10 +141,7 @@ ostrcpy (char *s1, char *s2)
x__Oexpon "**" */
x__Oexpon "**" */
void
void
__gnat_decode
(
coded_name
,
ada_name
,
verbose
)
__gnat_decode
(
const
char
*
coded_name
,
char
*
ada_name
,
int
verbose
)
const
char
*
coded_name
;
char
*
ada_name
;
int
verbose
;
{
{
int
lib_subprog
=
0
;
int
lib_subprog
=
0
;
int
overloaded
=
0
;
int
overloaded
=
0
;
...
@@ -322,8 +313,7 @@ __gnat_decode (coded_name, ada_name, verbose)
...
@@ -322,8 +313,7 @@ __gnat_decode (coded_name, ada_name, verbose)
}
}
char
*
char
*
ada_demangle
(
coded_name
)
ada_demangle
(
const
char
*
coded_name
)
const
char
*
coded_name
;
{
{
char
ada_name
[
2048
];
char
ada_name
[
2048
];
...
...
gcc/ada/adaint.c
View file @
9373164a
...
@@ -425,7 +425,7 @@ __gnat_try_lock (char *dir, char *file)
...
@@ -425,7 +425,7 @@ __gnat_try_lock (char *dir, char *file)
/* Return the maximum file name length. */
/* Return the maximum file name length. */
int
int
__gnat_get_maximum_file_name_length
()
__gnat_get_maximum_file_name_length
(
void
)
{
{
#if defined (MSDOS)
#if defined (MSDOS)
return
8
;
return
8
;
...
@@ -442,7 +442,7 @@ __gnat_get_maximum_file_name_length ()
...
@@ -442,7 +442,7 @@ __gnat_get_maximum_file_name_length ()
/* Return nonzero if file names are case sensitive. */
/* Return nonzero if file names are case sensitive. */
int
int
__gnat_get_file_names_case_sensitive
()
__gnat_get_file_names_case_sensitive
(
void
)
{
{
#if defined (__EMX__) || defined (MSDOS) || defined (VMS) || defined (WINNT)
#if defined (__EMX__) || defined (MSDOS) || defined (VMS) || defined (WINNT)
return
0
;
return
0
;
...
@@ -452,7 +452,7 @@ __gnat_get_file_names_case_sensitive ()
...
@@ -452,7 +452,7 @@ __gnat_get_file_names_case_sensitive ()
}
}
char
char
__gnat_get_default_identifier_character_set
()
__gnat_get_default_identifier_character_set
(
void
)
{
{
#if defined (__EMX__) || defined (MSDOS)
#if defined (__EMX__) || defined (MSDOS)
return
'p'
;
return
'p'
;
...
@@ -782,7 +782,7 @@ __gnat_readdir (DIR *dirp, char *buffer)
...
@@ -782,7 +782,7 @@ __gnat_readdir (DIR *dirp, char *buffer)
/* Returns 1 if readdir is thread safe, 0 otherwise. */
/* Returns 1 if readdir is thread safe, 0 otherwise. */
int
int
__gnat_readdir_is_thread_safe
()
__gnat_readdir_is_thread_safe
(
void
)
{
{
#ifdef HAVE_READDIR_R
#ifdef HAVE_READDIR_R
return
1
;
return
1
;
...
@@ -1270,7 +1270,7 @@ __gnat_set_env_value (char *name, char *value)
...
@@ -1270,7 +1270,7 @@ __gnat_set_env_value (char *name, char *value)
key. */
key. */
char
*
char
*
__gnat_get_libraries_from_registry
()
__gnat_get_libraries_from_registry
(
void
)
{
{
char
*
result
=
(
char
*
)
""
;
char
*
result
=
(
char
*
)
""
;
...
@@ -2299,13 +2299,13 @@ __gnat_to_canonical_file_list_init
...
@@ -2299,13 +2299,13 @@ __gnat_to_canonical_file_list_init
}
}
char
*
char
*
__gnat_to_canonical_file_list_next
()
__gnat_to_canonical_file_list_next
(
void
)
{
{
return
(
char
*
)
""
;
return
(
char
*
)
""
;
}
}
void
void
__gnat_to_canonical_file_list_free
()
__gnat_to_canonical_file_list_free
(
void
)
{
{
}
}
...
@@ -2340,7 +2340,7 @@ __gnat_to_host_file_spec (char *filespec)
...
@@ -2340,7 +2340,7 @@ __gnat_to_host_file_spec (char *filespec)
}
}
void
void
__gnat_adjust_os_resource_limits
()
__gnat_adjust_os_resource_limits
(
void
)
{
{
}
}
...
@@ -2458,9 +2458,8 @@ extern void __gnat_install_locks (void (*) (void), void (*) (void));
...
@@ -2458,9 +2458,8 @@ extern void __gnat_install_locks (void (*) (void), void (*) (void));
locking subprograms for libgcc_eh. */
locking subprograms for libgcc_eh. */
void
void
__gnatlib_install_locks
(
lock
,
unlock
)
__gnatlib_install_locks
(
void
(
*
lock
)
(
void
)
ATTRIBUTE_UNUSED
,
void
(
*
lock
)
(
void
)
ATTRIBUTE_UNUSED
;
void
(
*
unlock
)
(
void
)
ATTRIBUTE_UNUSED
)
void
(
*
unlock
)
(
void
)
ATTRIBUTE_UNUSED
;
{
{
#ifdef IN_RTS
#ifdef IN_RTS
__gnat_install_locks
(
lock
,
unlock
);
__gnat_install_locks
(
lock
,
unlock
);
...
...
gcc/ada/argv.c
View file @
9373164a
...
@@ -71,28 +71,25 @@ const char **gnat_envp = (const char **) 0;
...
@@ -71,28 +71,25 @@ const char **gnat_envp = (const char **) 0;
#endif
#endif
int
int
__gnat_arg_count
()
__gnat_arg_count
(
void
)
{
{
return
gnat_argc
;
return
gnat_argc
;
}
}
int
int
__gnat_len_arg
(
arg_num
)
__gnat_len_arg
(
int
arg_num
)
int
arg_num
;
{
{
return
strlen
(
gnat_argv
[
arg_num
]);
return
strlen
(
gnat_argv
[
arg_num
]);
}
}
void
void
__gnat_fill_arg
(
a
,
i
)
__gnat_fill_arg
(
char
*
a
,
int
i
)
char
*
a
;
int
i
;
{
{
strncpy
(
a
,
gnat_argv
[
i
],
strlen
(
gnat_argv
[
i
]));
strncpy
(
a
,
gnat_argv
[
i
],
strlen
(
gnat_argv
[
i
]));
}
}
int
int
__gnat_env_count
()
__gnat_env_count
(
void
)
{
{
int
i
;
int
i
;
...
@@ -102,16 +99,13 @@ __gnat_env_count ()
...
@@ -102,16 +99,13 @@ __gnat_env_count ()
}
}
int
int
__gnat_len_env
(
env_num
)
__gnat_len_env
(
int
env_num
)
int
env_num
;
{
{
return
strlen
(
gnat_envp
[
env_num
]);
return
strlen
(
gnat_envp
[
env_num
]);
}
}
void
void
__gnat_fill_env
(
a
,
i
)
__gnat_fill_env
(
char
*
a
,
int
i
)
char
*
a
;
int
i
;
{
{
strncpy
(
a
,
gnat_envp
[
i
],
strlen
(
gnat_envp
[
i
]));
strncpy
(
a
,
gnat_envp
[
i
],
strlen
(
gnat_envp
[
i
]));
}
}
gcc/ada/aux-io.c
View file @
9373164a
...
@@ -43,28 +43,28 @@
...
@@ -43,28 +43,28 @@
/* Function wrappers are needed to access the values from Ada which are
/* Function wrappers are needed to access the values from Ada which are
defined as C macros. */
defined as C macros. */
FILE
*
c_stdin
PARAMS
((
void
)
);
FILE
*
c_stdin
(
void
);
FILE
*
c_stdout
PARAMS
((
void
)
);
FILE
*
c_stdout
(
void
);
FILE
*
c_stderr
PARAMS
((
void
)
);
FILE
*
c_stderr
(
void
);
int
seek_set_function
PARAMS
((
void
)
);
int
seek_set_function
(
void
);
int
seek_end_function
PARAMS
((
void
)
);
int
seek_end_function
(
void
);
void
*
null_function
PARAMS
((
void
)
);
void
*
null_function
(
void
);
int
c_fileno
PARAMS
((
FILE
*
)
);
int
c_fileno
(
FILE
*
);
FILE
*
FILE
*
c_stdin
()
c_stdin
(
void
)
{
{
return
stdin
;
return
stdin
;
}
}
FILE
*
FILE
*
c_stdout
()
c_stdout
(
void
)
{
{
return
stdout
;
return
stdout
;
}
}
FILE
*
FILE
*
c_stderr
()
c_stderr
(
void
)
{
{
return
stderr
;
return
stderr
;
}
}
...
@@ -76,25 +76,24 @@ c_stderr ()
...
@@ -76,25 +76,24 @@ c_stderr ()
#endif
#endif
int
int
seek_set_function
()
seek_set_function
(
void
)
{
{
return
SEEK_SET
;
return
SEEK_SET
;
}
}
int
int
seek_end_function
()
seek_end_function
(
void
)
{
{
return
SEEK_END
;
return
SEEK_END
;
}
}
void
*
null_function
()
void
*
null_function
(
void
)
{
{
return
NULL
;
return
NULL
;
}
}
int
int
c_fileno
(
s
)
c_fileno
(
FILE
*
s
)
FILE
*
s
;
{
{
return
fileno
(
s
);
return
fileno
(
s
);
}
}
gcc/ada/cal.c
View file @
9373164a
...
@@ -94,7 +94,7 @@ __gnat_duration_to_timeval (long sec, long usec, struct timeval *t)
...
@@ -94,7 +94,7 @@ __gnat_duration_to_timeval (long sec, long usec, struct timeval *t)
what time_t is on the target. */
what time_t is on the target. */
long
long
gnat_time
()
gnat_time
(
void
)
{
{
return
time
(
0
);
return
time
(
0
);
}
}
gcc/ada/cio.c
View file @
9373164a
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
#endif
#endif
int
int
get_char
()
get_char
(
void
)
{
{
#ifdef VMS
#ifdef VMS
return
decc
$
getchar
();
return
decc
$
getchar
();
...
@@ -62,7 +62,7 @@ get_char ()
...
@@ -62,7 +62,7 @@ get_char ()
}
}
int
int
get_int
()
get_int
(
void
)
{
{
int
x
;
int
x
;
...
@@ -71,8 +71,7 @@ get_int ()
...
@@ -71,8 +71,7 @@ get_int ()
}
}
void
void
put_int
(
x
)
put_int
(
int
x
)
int
x
;
{
{
/* Use fprintf rather than printf, since the latter is unbuffered
/* Use fprintf rather than printf, since the latter is unbuffered
on vxworks */
on vxworks */
...
@@ -80,22 +79,19 @@ put_int (x)
...
@@ -80,22 +79,19 @@ put_int (x)
}
}
void
void
put_int_stderr
(
x
)
put_int_stderr
(
int
x
)
int
x
;
{
{
fprintf
(
stderr
,
"%d"
,
x
);
fprintf
(
stderr
,
"%d"
,
x
);
}
}
void
void
put_char
(
c
)
put_char
(
int
c
)
int
c
;
{
{
putchar
(
c
);
putchar
(
c
);
}
}
void
void
put_char_stderr
(
c
)
put_char_stderr
(
int
c
)
int
c
;
{
{
fputc
(
c
,
stderr
);
fputc
(
c
,
stderr
);
}
}
...
@@ -103,8 +99,7 @@ put_char_stderr (c)
...
@@ -103,8 +99,7 @@ put_char_stderr (c)
#ifdef __vxworks
#ifdef __vxworks
char
*
char
*
mktemp
(
template
)
mktemp
(
char
*
template
)
char
*
template
;
{
{
return
tmpnam
(
NULL
);
return
tmpnam
(
NULL
);
}
}
...
...
gcc/ada/cstreams.c
View file @
9373164a
...
@@ -76,29 +76,25 @@
...
@@ -76,29 +76,25 @@
#endif
#endif
int
int
__gnat_feof
(
stream
)
__gnat_feof
(
FILE
*
stream
)
FILE
*
stream
;
{
{
return
(
feof
(
stream
));
return
(
feof
(
stream
));
}
}
int
int
__gnat_ferror
(
stream
)
__gnat_ferror
(
FILE
*
stream
)
FILE
*
stream
;
{
{
return
(
ferror
(
stream
));
return
(
ferror
(
stream
));
}
}
int
int
__gnat_fileno
(
stream
)
__gnat_fileno
(
FILE
*
stream
)
FILE
*
stream
;
{
{
return
(
fileno
(
stream
));
return
(
fileno
(
stream
));
}
}
int
int
__gnat_is_regular_file_fd
(
fd
)
__gnat_is_regular_file_fd
(
int
fd
)
int
fd
;
{
{
int
ret
;
int
ret
;
struct
stat
statbuf
;
struct
stat
statbuf
;
...
...
gcc/ada/ctrl_c.c
View file @
9373164a
...
@@ -132,7 +132,7 @@ __gnat_install_int_handler (void (*proc) (void))
...
@@ -132,7 +132,7 @@ __gnat_install_int_handler (void (*proc) (void))
}
}
void
void
__gnat_uninstall_int_handler
()
__gnat_uninstall_int_handler
(
void
)
{
{
if
(
sigint_intercepted
!=
NULL
)
if
(
sigint_intercepted
!=
NULL
)
SetConsoleCtrlHandler
(
__gnat_int_handler
,
FALSE
);
SetConsoleCtrlHandler
(
__gnat_int_handler
,
FALSE
);
...
@@ -150,7 +150,7 @@ __gnat_install_int_handler (void (*proc) (void) __attribute__ ((unused)))
...
@@ -150,7 +150,7 @@ __gnat_install_int_handler (void (*proc) (void) __attribute__ ((unused)))
}
}
void
void
__gnat_uninstall_int_handler
()
__gnat_uninstall_int_handler
(
void
)
{
{
}
}
#endif
#endif
gcc/ada/cuintp.c
View file @
9373164a
...
@@ -57,9 +57,7 @@
...
@@ -57,9 +57,7 @@
resulting node. */
resulting node. */
tree
tree
UI_To_gnu
(
Input
,
type
)
UI_To_gnu
(
Uint
Input
,
tree
type
)
Uint
Input
;
tree
type
;
{
{
tree
gnu_ret
;
tree
gnu_ret
;
...
...
gcc/ada/decl.c
View file @
9373164a
...
@@ -82,42 +82,34 @@ static struct incomplete
...
@@ -82,42 +82,34 @@ static struct incomplete
Entity_Id
full_type
;
Entity_Id
full_type
;
}
*
defer_incomplete_list
=
0
;
}
*
defer_incomplete_list
=
0
;
static
tree
substitution_list
PARAMS
((
Entity_Id
,
Entity_Id
,
static
tree
substitution_list
(
Entity_Id
,
Entity_Id
,
tree
,
int
);
tree
,
int
));
static
int
allocatable_size_p
(
tree
,
int
);
static
int
allocatable_size_p
PARAMS
((
tree
,
int
));
static
struct
attrib
*
build_attr_list
(
Entity_Id
);
static
struct
attrib
*
build_attr_list
PARAMS
((
Entity_Id
));
static
tree
elaborate_expression
(
Node_Id
,
Entity_Id
,
tree
,
int
,
int
,
int
);
static
tree
elaborate_expression
PARAMS
((
Node_Id
,
Entity_Id
,
tree
,
static
int
is_variable_size
(
tree
);
int
,
int
,
int
));
static
tree
elaborate_expression_1
(
Node_Id
,
Entity_Id
,
tree
,
tree
,
int
,
int
);
static
int
is_variable_size
PARAMS
((
tree
));
static
tree
make_packable_type
(
tree
);
static
tree
elaborate_expression_1
PARAMS
((
Node_Id
,
Entity_Id
,
tree
,
static
tree
maybe_pad_type
(
tree
,
tree
,
unsigned
int
,
Entity_Id
,
const
char
*
,
tree
,
int
,
int
));
int
,
int
,
int
);
static
tree
make_packable_type
PARAMS
((
tree
));
static
tree
gnat_to_gnu_field
(
Entity_Id
,
tree
,
int
,
int
);
static
tree
maybe_pad_type
PARAMS
((
tree
,
tree
,
unsigned
int
,
static
void
components_to_record
(
tree
,
Node_Id
,
tree
,
int
,
int
,
tree
*
,
Entity_Id
,
const
char
*
,
int
,
int
,
int
);
int
,
int
));
static
int
compare_field_bitpos
(
const
PTR
,
const
PTR
);
static
tree
gnat_to_gnu_field
PARAMS
((
Entity_Id
,
tree
,
int
,
int
));
static
Uint
annotate_value
(
tree
);
static
void
components_to_record
PARAMS
((
tree
,
Node_Id
,
tree
,
int
,
static
void
annotate_rep
(
Entity_Id
,
tree
);
int
,
tree
*
,
int
,
int
));
static
tree
compute_field_positions
(
tree
,
tree
,
tree
,
tree
,
unsigned
int
);
static
int
compare_field_bitpos
PARAMS
((
const
PTR
,
const
PTR
));
static
tree
validate_size
(
Uint
,
tree
,
Entity_Id
,
enum
tree_code
,
int
,
int
);
static
Uint
annotate_value
PARAMS
((
tree
));
static
void
set_rm_size
(
Uint
,
tree
,
Entity_Id
);
static
void
annotate_rep
PARAMS
((
Entity_Id
,
tree
));
static
tree
make_type_from_size
(
tree
,
tree
,
int
);
static
tree
compute_field_positions
PARAMS
((
tree
,
tree
,
tree
,
tree
,
static
unsigned
int
validate_alignment
(
Uint
,
Entity_Id
,
unsigned
int
);
unsigned
int
));
static
void
check_ok_for_atomic
(
tree
,
Entity_Id
,
int
);
static
tree
validate_size
PARAMS
((
Uint
,
tree
,
Entity_Id
,
enum
tree_code
,
int
,
int
));
static
void
set_rm_size
PARAMS
((
Uint
,
tree
,
Entity_Id
));
static
tree
make_type_from_size
PARAMS
((
tree
,
tree
,
int
));
static
unsigned
int
validate_alignment
PARAMS
((
Uint
,
Entity_Id
,
unsigned
int
));
static
void
check_ok_for_atomic
PARAMS
((
tree
,
Entity_Id
,
int
));
/* Given GNAT_ENTITY, an entity in the incoming GNAT tree, return a
/* Given GNAT_ENTITY, an entity in the incoming GNAT tree, return a
GCC type corresponding to that entity. GNAT_ENTITY is assumed to
GCC type corresponding to that entity. GNAT_ENTITY is assumed to
refer to an Ada type. */
refer to an Ada type. */
tree
tree
gnat_to_gnu_type
(
gnat_entity
)
gnat_to_gnu_type
(
Entity_Id
gnat_entity
)
Entity_Id
gnat_entity
;
{
{
tree
gnu_decl
;
tree
gnu_decl
;
...
@@ -146,10 +138,7 @@ gnat_to_gnu_type (gnat_entity)
...
@@ -146,10 +138,7 @@ gnat_to_gnu_type (gnat_entity)
the code. */
the code. */
tree
tree
gnat_to_gnu_entity
(
gnat_entity
,
gnu_expr
,
definition
)
gnat_to_gnu_entity
(
Entity_Id
gnat_entity
,
tree
gnu_expr
,
int
definition
)
Entity_Id
gnat_entity
;
tree
gnu_expr
;
int
definition
;
{
{
tree
gnu_entity_id
;
tree
gnu_entity_id
;
tree
gnu_type
=
0
;
tree
gnu_type
=
0
;
...
@@ -4037,8 +4026,7 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
...
@@ -4037,8 +4026,7 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
be elaborated at the point of its definition, but do nothing else. */
be elaborated at the point of its definition, but do nothing else. */
void
void
elaborate_entity
(
gnat_entity
)
elaborate_entity
(
Entity_Id
gnat_entity
)
Entity_Id
gnat_entity
;
{
{
switch
(
Ekind
(
gnat_entity
))
switch
(
Ekind
(
gnat_entity
))
{
{
...
@@ -4109,8 +4097,7 @@ elaborate_entity (gnat_entity)
...
@@ -4109,8 +4097,7 @@ elaborate_entity (gnat_entity)
any entities on its entity chain similarly. */
any entities on its entity chain similarly. */
void
void
mark_out_of_scope
(
gnat_entity
)
mark_out_of_scope
(
Entity_Id
gnat_entity
)
Entity_Id
gnat_entity
;
{
{
Entity_Id
gnat_sub_entity
;
Entity_Id
gnat_sub_entity
;
unsigned
int
kind
=
Ekind
(
gnat_entity
);
unsigned
int
kind
=
Ekind
(
gnat_entity
);
...
@@ -4153,11 +4140,10 @@ mark_out_of_scope (gnat_entity)
...
@@ -4153,11 +4140,10 @@ mark_out_of_scope (gnat_entity)
DEFINITION is as in gnat_to_gnu_entity. */
DEFINITION is as in gnat_to_gnu_entity. */
static
tree
static
tree
substitution_list
(
gnat_subtype
,
gnat_type
,
gnu_list
,
definition
)
substitution_list
(
Entity_Id
gnat_subtype
,
Entity_Id
gnat_subtype
;
Entity_Id
gnat_type
,
Entity_Id
gnat_type
;
tree
gnu_list
,
tree
gnu_list
;
int
definition
)
int
definition
;
{
{
Entity_Id
gnat_discrim
;
Entity_Id
gnat_discrim
;
Node_Id
gnat_value
;
Node_Id
gnat_value
;
...
@@ -4191,7 +4177,7 @@ static GTY((length ("max_gnat_nodes"))) tree * dummy_node_table;
...
@@ -4191,7 +4177,7 @@ static GTY((length ("max_gnat_nodes"))) tree * dummy_node_table;
/* Initialize the above table. */
/* Initialize the above table. */
void
void
init_dummy_type
()
init_dummy_type
(
void
)
{
{
Node_Id
gnat_node
;
Node_Id
gnat_node
;
...
@@ -4206,8 +4192,7 @@ init_dummy_type ()
...
@@ -4206,8 +4192,7 @@ init_dummy_type ()
/* Make a dummy type corresponding to GNAT_TYPE. */
/* Make a dummy type corresponding to GNAT_TYPE. */
tree
tree
make_dummy_type
(
gnat_type
)
make_dummy_type
(
Entity_Id
gnat_type
)
Entity_Id
gnat_type
;
{
{
Entity_Id
gnat_underlying
;
Entity_Id
gnat_underlying
;
tree
gnu_type
;
tree
gnu_type
;
...
@@ -4253,9 +4238,7 @@ make_dummy_type (gnat_type)
...
@@ -4253,9 +4238,7 @@ make_dummy_type (gnat_type)
done with a static allocation. */
done with a static allocation. */
static
int
static
int
allocatable_size_p
(
gnu_size
,
static_p
)
allocatable_size_p
(
tree
gnu_size
,
int
static_p
)
tree
gnu_size
;
int
static_p
;
{
{
HOST_WIDE_INT
our_size
;
HOST_WIDE_INT
our_size
;
...
@@ -4279,8 +4262,7 @@ allocatable_size_p (gnu_size, static_p)
...
@@ -4279,8 +4262,7 @@ allocatable_size_p (gnu_size, static_p)
/* Return a list of attributes for GNAT_ENTITY, if any. */
/* Return a list of attributes for GNAT_ENTITY, if any. */
static
struct
attrib
*
static
struct
attrib
*
build_attr_list
(
gnat_entity
)
build_attr_list
(
Entity_Id
gnat_entity
)
Entity_Id
gnat_entity
;
{
{
struct
attrib
*
attr_list
=
0
;
struct
attrib
*
attr_list
=
0
;
Node_Id
gnat_temp
;
Node_Id
gnat_temp
;
...
@@ -4352,8 +4334,7 @@ build_attr_list (gnat_entity)
...
@@ -4352,8 +4334,7 @@ build_attr_list (gnat_entity)
/* Get the unpadded version of a GNAT type. */
/* Get the unpadded version of a GNAT type. */
tree
tree
get_unpadded_type
(
gnat_entity
)
get_unpadded_type
(
Entity_Id
gnat_entity
)
Entity_Id
gnat_entity
;
{
{
tree
type
=
gnat_to_gnu_type
(
gnat_entity
);
tree
type
=
gnat_to_gnu_type
(
gnat_entity
);
...
@@ -4366,9 +4347,7 @@ get_unpadded_type (gnat_entity)
...
@@ -4366,9 +4347,7 @@ get_unpadded_type (gnat_entity)
/* Called when we need to protect a variable object using a save_expr. */
/* Called when we need to protect a variable object using a save_expr. */
tree
tree
maybe_variable
(
gnu_operand
,
gnat_node
)
maybe_variable
(
tree
gnu_operand
,
Node_Id
gnat_node
)
tree
gnu_operand
;
Node_Id
gnat_node
;
{
{
if
(
TREE_CONSTANT
(
gnu_operand
)
||
TREE_READONLY
(
gnu_operand
)
if
(
TREE_CONSTANT
(
gnu_operand
)
||
TREE_READONLY
(
gnu_operand
)
||
TREE_CODE
(
gnu_operand
)
==
SAVE_EXPR
||
TREE_CODE
(
gnu_operand
)
==
SAVE_EXPR
...
@@ -4397,14 +4376,12 @@ maybe_variable (gnu_operand, gnat_node)
...
@@ -4397,14 +4376,12 @@ maybe_variable (gnu_operand, gnat_node)
purposes even if it isn't needed for code generation. */
purposes even if it isn't needed for code generation. */
static
tree
static
tree
elaborate_expression
(
gnat_expr
,
gnat_entity
,
gnu_name
,
definition
,
elaborate_expression
(
Node_Id
gnat_expr
,
need_value
,
need_debug
)
Entity_Id
gnat_entity
,
Node_Id
gnat_expr
;
tree
gnu_name
,
Entity_Id
gnat_entity
;
int
definition
,
tree
gnu_name
;
int
need_value
,
int
definition
;
int
need_debug
)
int
need_value
;
int
need_debug
;
{
{
tree
gnu_expr
;
tree
gnu_expr
;
...
@@ -4439,14 +4416,12 @@ elaborate_expression (gnat_expr, gnat_entity, gnu_name, definition,
...
@@ -4439,14 +4416,12 @@ elaborate_expression (gnat_expr, gnat_entity, gnu_name, definition,
/* Similar, but take a GNU expression. */
/* Similar, but take a GNU expression. */
static
tree
static
tree
elaborate_expression_1
(
gnat_expr
,
gnat_entity
,
gnu_expr
,
gnu_name
,
definition
,
elaborate_expression_1
(
Node_Id
gnat_expr
,
need_debug
)
Entity_Id
gnat_entity
,
Node_Id
gnat_expr
;
tree
gnu_expr
,
Entity_Id
gnat_entity
;
tree
gnu_name
,
tree
gnu_expr
;
int
definition
,
tree
gnu_name
;
int
need_debug
)
int
definition
;
int
need_debug
;
{
{
tree
gnu_decl
=
0
;
tree
gnu_decl
=
0
;
/* Strip any conversions to see if the expression is a readonly variable.
/* Strip any conversions to see if the expression is a readonly variable.
...
@@ -4514,10 +4489,7 @@ elaborate_expression_1 (gnat_expr, gnat_entity, gnu_expr, gnu_name, definition,
...
@@ -4514,10 +4489,7 @@ elaborate_expression_1 (gnat_expr, gnat_entity, gnu_expr, gnu_name, definition,
position so that it is aligned to ALIGN bits and is SIZE bytes long. */
position so that it is aligned to ALIGN bits and is SIZE bytes long. */
tree
tree
make_aligning_type
(
type
,
align
,
size
)
make_aligning_type
(
tree
type
,
int
align
,
tree
size
)
tree
type
;
int
align
;
tree
size
;
{
{
tree
record_type
=
make_node
(
RECORD_TYPE
);
tree
record_type
=
make_node
(
RECORD_TYPE
);
tree
place
=
build
(
PLACEHOLDER_EXPR
,
record_type
);
tree
place
=
build
(
PLACEHOLDER_EXPR
,
record_type
);
...
@@ -4568,8 +4540,7 @@ make_aligning_type (type, align, size)
...
@@ -4568,8 +4540,7 @@ make_aligning_type (type, align, size)
return the new type. If not, return the original type. */
return the new type. If not, return the original type. */
static
tree
static
tree
make_packable_type
(
type
)
make_packable_type
(
tree
type
)
tree
type
;
{
{
tree
new_type
=
make_node
(
TREE_CODE
(
type
));
tree
new_type
=
make_node
(
TREE_CODE
(
type
));
tree
field_list
=
NULL_TREE
;
tree
field_list
=
NULL_TREE
;
...
@@ -4645,16 +4616,14 @@ make_packable_type (type)
...
@@ -4645,16 +4616,14 @@ make_packable_type (type)
type. */
type. */
static
tree
static
tree
maybe_pad_type
(
type
,
size
,
align
,
gnat_entity
,
name_trailer
,
maybe_pad_type
(
tree
type
,
is_user_type
,
definition
,
same_rm_size
)
tree
size
,
tree
type
;
unsigned
int
align
,
tree
size
;
Entity_Id
gnat_entity
,
unsigned
int
align
;
const
char
*
name_trailer
,
Entity_Id
gnat_entity
;
int
is_user_type
,
const
char
*
name_trailer
;
int
definition
,
int
is_user_type
;
int
same_rm_size
)
int
definition
;
int
same_rm_size
;
{
{
tree
orig_size
=
TYPE_SIZE
(
type
);
tree
orig_size
=
TYPE_SIZE
(
type
);
tree
record
;
tree
record
;
...
@@ -4830,9 +4799,7 @@ maybe_pad_type (type, size, align, gnat_entity, name_trailer,
...
@@ -4830,9 +4799,7 @@ maybe_pad_type (type, size, align, gnat_entity, name_trailer,
the value passed against the list of choices. */
the value passed against the list of choices. */
tree
tree
choices_to_gnu
(
operand
,
choices
)
choices_to_gnu
(
tree
operand
,
Node_Id
choices
)
tree
operand
;
Node_Id
choices
;
{
{
Node_Id
choice
;
Node_Id
choice
;
Node_Id
gnat_temp
;
Node_Id
gnat_temp
;
...
@@ -4924,11 +4891,10 @@ choices_to_gnu (operand, choices)
...
@@ -4924,11 +4891,10 @@ choices_to_gnu (operand, choices)
DEFINITION is nonzero if this field is for a record being defined. */
DEFINITION is nonzero if this field is for a record being defined. */
static
tree
static
tree
gnat_to_gnu_field
(
gnat_field
,
gnu_record_type
,
packed
,
definition
)
gnat_to_gnu_field
(
Entity_Id
gnat_field
,
Entity_Id
gnat_field
;
tree
gnu_record_type
,
tree
gnu_record_type
;
int
packed
,
int
packed
;
int
definition
)
int
definition
;
{
{
tree
gnu_field_id
=
get_entity_name
(
gnat_field
);
tree
gnu_field_id
=
get_entity_name
(
gnat_field
);
tree
gnu_field_type
=
gnat_to_gnu_type
(
Etype
(
gnat_field
));
tree
gnu_field_type
=
gnat_to_gnu_type
(
Etype
(
gnat_field
));
...
@@ -5173,8 +5139,7 @@ gnat_to_gnu_field (gnat_field, gnu_record_type, packed, definition)
...
@@ -5173,8 +5139,7 @@ gnat_to_gnu_field (gnat_field, gnu_record_type, packed, definition)
of variable size or is a record that has a field such a field. */
of variable size or is a record that has a field such a field. */
static
int
static
int
is_variable_size
(
type
)
is_variable_size
(
tree
type
)
tree
type
;
{
{
tree
field
;
tree
field
;
...
@@ -5229,16 +5194,14 @@ is_variable_size (type)
...
@@ -5229,16 +5194,14 @@ is_variable_size (type)
fields of the record and then the record type is finished. */
fields of the record and then the record type is finished. */
static
void
static
void
components_to_record
(
gnu_record_type
,
component_list
,
gnu_field_list
,
packed
,
components_to_record
(
tree
gnu_record_type
,
definition
,
p_gnu_rep_list
,
cancel_alignment
,
all_rep
)
Node_Id
component_list
,
tree
gnu_record_type
;
tree
gnu_field_list
,
Node_Id
component_list
;
int
packed
,
tree
gnu_field_list
;
int
definition
,
int
packed
;
tree
*
p_gnu_rep_list
,
int
definition
;
int
cancel_alignment
,
tree
*
p_gnu_rep_list
;
int
all_rep
)
int
cancel_alignment
;
int
all_rep
;
{
{
Node_Id
component_decl
;
Node_Id
component_decl
;
Entity_Id
gnat_field
;
Entity_Id
gnat_field
;
...
@@ -5502,9 +5465,7 @@ components_to_record (gnu_record_type, component_list, gnu_field_list, packed,
...
@@ -5502,9 +5465,7 @@ components_to_record (gnu_record_type, component_list, gnu_field_list, packed,
bit positions and ordinals of the two fields. */
bit positions and ordinals of the two fields. */
static
int
static
int
compare_field_bitpos
(
rt1
,
rt2
)
compare_field_bitpos
(
const
PTR
rt1
,
const
PTR
rt2
)
const
PTR
rt1
;
const
PTR
rt2
;
{
{
tree
*
t1
=
(
tree
*
)
rt1
;
tree
*
t1
=
(
tree
*
)
rt1
;
tree
*
t2
=
(
tree
*
)
rt2
;
tree
*
t2
=
(
tree
*
)
rt2
;
...
@@ -5524,8 +5485,7 @@ compare_field_bitpos (rt1, rt2)
...
@@ -5524,8 +5485,7 @@ compare_field_bitpos (rt1, rt2)
in the GNAT tree. */
in the GNAT tree. */
static
Uint
static
Uint
annotate_value
(
gnu_size
)
annotate_value
(
tree
gnu_size
)
tree
gnu_size
;
{
{
int
len
=
TREE_CODE_LENGTH
(
TREE_CODE
(
gnu_size
));
int
len
=
TREE_CODE_LENGTH
(
TREE_CODE
(
gnu_size
));
TCode
tcode
;
TCode
tcode
;
...
@@ -5663,9 +5623,7 @@ annotate_value (gnu_size)
...
@@ -5663,9 +5623,7 @@ annotate_value (gnu_size)
used by Gigi. */
used by Gigi. */
static
void
static
void
annotate_rep
(
gnat_entity
,
gnu_type
)
annotate_rep
(
Entity_Id
gnat_entity
,
tree
gnu_type
)
Entity_Id
gnat_entity
;
tree
gnu_type
;
{
{
tree
gnu_list
;
tree
gnu_list
;
tree
gnu_entry
;
tree
gnu_entry
;
...
@@ -5743,12 +5701,11 @@ annotate_rep (gnat_entity, gnu_type)
...
@@ -5743,12 +5701,11 @@ annotate_rep (gnat_entity, gnu_type)
so far. */
so far. */
static
tree
static
tree
compute_field_positions
(
gnu_type
,
gnu_list
,
gnu_pos
,
gnu_bitpos
,
offset_align
)
compute_field_positions
(
tree
gnu_type
,
tree
gnu_type
;
tree
gnu_list
,
tree
gnu_list
;
tree
gnu_pos
,
tree
gnu_pos
;
tree
gnu_bitpos
,
tree
gnu_bitpos
;
unsigned
int
offset_align
)
unsigned
int
offset_align
;
{
{
tree
gnu_field
;
tree
gnu_field
;
tree
gnu_result
=
gnu_list
;
tree
gnu_result
=
gnu_list
;
...
@@ -5792,13 +5749,12 @@ compute_field_positions (gnu_type, gnu_list, gnu_pos, gnu_bitpos, offset_align)
...
@@ -5792,13 +5749,12 @@ compute_field_positions (gnu_type, gnu_list, gnu_pos, gnu_bitpos, offset_align)
it means that a size of zero should be treated as an unspecified size. */
it means that a size of zero should be treated as an unspecified size. */
static
tree
static
tree
validate_size
(
uint_size
,
gnu_type
,
gnat_object
,
kind
,
component_p
,
zero_ok
)
validate_size
(
Uint
uint_size
,
Uint
uint_size
;
tree
gnu_type
,
tree
gnu_type
;
Entity_Id
gnat_object
,
Entity_Id
gnat_object
;
enum
tree_code
kind
,
enum
tree_code
kind
;
int
component_p
,
int
component_p
;
int
zero_ok
)
int
zero_ok
;
{
{
Node_Id
gnat_error_node
;
Node_Id
gnat_error_node
;
tree
type_size
tree
type_size
...
@@ -5911,10 +5867,7 @@ validate_size (uint_size, gnu_type, gnat_object, kind, component_p, zero_ok)
...
@@ -5911,10 +5867,7 @@ validate_size (uint_size, gnu_type, gnat_object, kind, component_p, zero_ok)
routine is only called for types. */
routine is only called for types. */
static
void
static
void
set_rm_size
(
uint_size
,
gnu_type
,
gnat_entity
)
set_rm_size
(
Uint
uint_size
,
tree
gnu_type
,
Entity_Id
gnat_entity
)
Uint
uint_size
;
tree
gnu_type
;
Entity_Id
gnat_entity
;
{
{
/* Only give an error if a Value_Size clause was explicitly given.
/* Only give an error if a Value_Size clause was explicitly given.
Otherwise, we'd be duplicating an error on the Size clause. */
Otherwise, we'd be duplicating an error on the Size clause. */
...
@@ -5988,10 +5941,7 @@ set_rm_size (uint_size, gnu_type, gnat_entity)
...
@@ -5988,10 +5941,7 @@ set_rm_size (uint_size, gnu_type, gnat_entity)
we are making a biased type. */
we are making a biased type. */
static
tree
static
tree
make_type_from_size
(
type
,
size_tree
,
biased_p
)
make_type_from_size
(
tree
type
,
tree
size_tree
,
int
biased_p
)
tree
type
;
tree
size_tree
;
int
biased_p
;
{
{
tree
new_type
;
tree
new_type
;
unsigned
HOST_WIDE_INT
size
;
unsigned
HOST_WIDE_INT
size
;
...
@@ -6061,10 +6011,7 @@ make_type_from_size (type, size_tree, biased_p)
...
@@ -6061,10 +6011,7 @@ make_type_from_size (type, size_tree, biased_p)
valid, return it. Otherwise, give an error and return ALIGN. */
valid, return it. Otherwise, give an error and return ALIGN. */
static
unsigned
int
static
unsigned
int
validate_alignment
(
alignment
,
gnat_entity
,
align
)
validate_alignment
(
Uint
alignment
,
Entity_Id
gnat_entity
,
unsigned
int
align
)
Uint
alignment
;
Entity_Id
gnat_entity
;
unsigned
int
align
;
{
{
Node_Id
gnat_error_node
=
gnat_entity
;
Node_Id
gnat_error_node
=
gnat_entity
;
unsigned
int
new_align
;
unsigned
int
new_align
;
...
@@ -6109,10 +6056,7 @@ validate_alignment (alignment, gnat_entity, align)
...
@@ -6109,10 +6056,7 @@ validate_alignment (alignment, gnat_entity, align)
if we require atomic components. */
if we require atomic components. */
static
void
static
void
check_ok_for_atomic
(
object
,
gnat_entity
,
comp_p
)
check_ok_for_atomic
(
tree
object
,
Entity_Id
gnat_entity
,
int
comp_p
)
tree
object
;
Entity_Id
gnat_entity
;
int
comp_p
;
{
{
Node_Id
gnat_error_point
=
gnat_entity
;
Node_Id
gnat_error_point
=
gnat_entity
;
Node_Id
gnat_node
;
Node_Id
gnat_node
;
...
@@ -6188,8 +6132,7 @@ check_ok_for_atomic (object, gnat_entity, comp_p)
...
@@ -6188,8 +6132,7 @@ check_ok_for_atomic (object, gnat_entity, comp_p)
changed. */
changed. */
tree
tree
gnat_substitute_in_type
(
t
,
f
,
r
)
gnat_substitute_in_type
(
tree
t
,
tree
f
,
tree
r
)
tree
t
,
f
,
r
;
{
{
tree
new
=
t
;
tree
new
=
t
;
tree
tem
;
tree
tem
;
...
@@ -6410,8 +6353,7 @@ gnat_substitute_in_type (t, f, r)
...
@@ -6410,8 +6353,7 @@ gnat_substitute_in_type (t, f, r)
needed to represent the object. */
needed to represent the object. */
tree
tree
rm_size
(
gnu_type
)
rm_size
(
tree
gnu_type
)
tree
gnu_type
;
{
{
/* For integer types, this is the precision. For record types, we store
/* For integer types, this is the precision. For record types, we store
the size explicitly. For other types, this is just the size. */
the size explicitly. For other types, this is just the size. */
...
@@ -6440,9 +6382,7 @@ rm_size (gnu_type)
...
@@ -6440,9 +6382,7 @@ rm_size (gnu_type)
and the specified suffix. */
and the specified suffix. */
tree
tree
create_concat_name
(
gnat_entity
,
suffix
)
create_concat_name
(
Entity_Id
gnat_entity
,
const
char
*
suffix
)
Entity_Id
gnat_entity
;
const
char
*
suffix
;
{
{
const
char
*
str
=
(
suffix
==
0
?
""
:
suffix
);
const
char
*
str
=
(
suffix
==
0
?
""
:
suffix
);
String_Template
temp
=
{
1
,
strlen
(
str
)};
String_Template
temp
=
{
1
,
strlen
(
str
)};
...
@@ -6480,8 +6420,7 @@ create_concat_name (gnat_entity, suffix)
...
@@ -6480,8 +6420,7 @@ create_concat_name (gnat_entity, suffix)
Otherwise, return the name. */
Otherwise, return the name. */
tree
tree
get_entity_name
(
gnat_entity
)
get_entity_name
(
Entity_Id
gnat_entity
)
Entity_Id
gnat_entity
;
{
{
Get_Encoded_Name
(
gnat_entity
);
Get_Encoded_Name
(
gnat_entity
);
return
get_identifier
(
Name_Buffer
);
return
get_identifier
(
Name_Buffer
);
...
@@ -6492,9 +6431,7 @@ get_entity_name (gnat_entity)
...
@@ -6492,9 +6431,7 @@ get_entity_name (gnat_entity)
the name in GNU_ID and SUFFIX. */
the name in GNU_ID and SUFFIX. */
tree
tree
concat_id_with_name
(
gnu_id
,
suffix
)
concat_id_with_name
(
tree
gnu_id
,
const
char
*
suffix
)
tree
gnu_id
;
const
char
*
suffix
;
{
{
int
len
=
IDENTIFIER_LENGTH
(
gnu_id
);
int
len
=
IDENTIFIER_LENGTH
(
gnu_id
);
...
...
gcc/ada/errno.c
View file @
9373164a
...
@@ -42,14 +42,13 @@
...
@@ -42,14 +42,13 @@
#include <errno.h>
#include <errno.h>
int
int
__get_errno
()
__get_errno
(
void
)
{
{
return
errno
;
return
errno
;
}
}
void
void
__set_errno
(
err
)
__set_errno
(
int
err
)
int
err
;
{
{
errno
=
err
;
errno
=
err
;
}
}
gcc/ada/exit.c
View file @
9373164a
...
@@ -50,8 +50,7 @@
...
@@ -50,8 +50,7 @@
int
gnat_exit_status
=
0
;
int
gnat_exit_status
=
0
;
void
void
__gnat_set_exit_status
(
i
)
__gnat_set_exit_status
(
int
i
)
int
i
;
{
{
gnat_exit_status
=
i
;
gnat_exit_status
=
i
;
}
}
gcc/ada/expect.c
View file @
9373164a
...
@@ -72,7 +72,7 @@ __gnat_kill (int pid, int sig)
...
@@ -72,7 +72,7 @@ __gnat_kill (int pid, int sig)
}
}
int
int
__gnat_expect_fork
()
__gnat_expect_fork
(
void
)
{
{
return
0
;
return
0
;
}
}
...
@@ -159,7 +159,7 @@ __gnat_pipe (int *fd)
...
@@ -159,7 +159,7 @@ __gnat_pipe (int *fd)
}
}
int
int
__gnat_expect_fork
()
__gnat_expect_fork
(
void
)
{
{
return
-
1
;
return
-
1
;
}
}
...
@@ -299,7 +299,7 @@ __gnat_pipe (int *fd)
...
@@ -299,7 +299,7 @@ __gnat_pipe (int *fd)
}
}
int
int
__gnat_expect_fork
()
__gnat_expect_fork
(
void
)
{
{
return
fork
();
return
fork
();
}
}
...
@@ -406,7 +406,7 @@ __gnat_pipe (int *fd)
...
@@ -406,7 +406,7 @@ __gnat_pipe (int *fd)
}
}
int
int
__gnat_expect_fork
()
__gnat_expect_fork
(
void
)
{
{
return
-
1
;
return
-
1
;
}
}
...
...
gcc/ada/final.c
View file @
9373164a
...
@@ -38,6 +38,6 @@ extern void __gnat_finalize (void);
...
@@ -38,6 +38,6 @@ extern void __gnat_finalize (void);
where finalization is required. */
where finalization is required. */
void
void
__gnat_finalize
()
__gnat_finalize
(
void
)
{
{
}
}
gcc/ada/gmem.c
View file @
9373164a
...
@@ -75,7 +75,7 @@ convert_addresses (char *addrs[], int n_addr, void *buf, int *len);
...
@@ -75,7 +75,7 @@ convert_addresses (char *addrs[], int n_addr, void *buf, int *len);
*/
*/
static
void
static
void
gmem_read_backtrace
()
gmem_read_backtrace
(
void
)
{
{
fread
(
&
cur_tb_len
,
sizeof
(
int
),
1
,
gmemfile
);
fread
(
&
cur_tb_len
,
sizeof
(
int
),
1
,
gmemfile
);
fread
(
tracebk
,
sizeof
(
char
*
),
cur_tb_len
,
gmemfile
);
fread
(
tracebk
,
sizeof
(
char
*
),
cur_tb_len
,
gmemfile
);
...
@@ -120,8 +120,7 @@ void __gnat_gmem_a2l_initialize (char *exename)
...
@@ -120,8 +120,7 @@ void __gnat_gmem_a2l_initialize (char *exename)
write an alloc/free information in buf to be processed by gnatmem */
write an alloc/free information in buf to be processed by gnatmem */
void
void
__gnat_gmem_read_next
(
buf
)
__gnat_gmem_read_next
(
struct
struct_storage_elmt
*
buf
)
struct
struct_storage_elmt
*
buf
;
{
{
void
*
addr
;
void
*
addr
;
size_t
size
;
size_t
size
;
...
...
gcc/ada/gnatbl.c
View file @
9373164a
...
@@ -72,12 +72,11 @@ char *gcc_B_arg = 0;
...
@@ -72,12 +72,11 @@ char *gcc_B_arg = 0;
static
int
linkonly
=
0
;
static
int
linkonly
=
0
;
static
void
addarg
PARAMS
((
char
*
)
);
static
void
addarg
(
char
*
);
static
void
process_args
PARAMS
((
int
*
,
char
*
[])
);
static
void
process_args
(
int
*
,
char
*
[]
);
static
void
static
void
addarg
(
str
)
addarg
(
char
*
str
)
char
*
str
;
{
{
int
i
;
int
i
;
...
@@ -100,9 +99,7 @@ addarg (str)
...
@@ -100,9 +99,7 @@ addarg (str)
}
}
static
void
static
void
process_args
(
p_argc
,
argv
)
process_args
(
int
*
p_argc
,
char
*
argv
[])
int
*
p_argc
;
char
*
argv
[];
{
{
int
i
,
j
;
int
i
,
j
;
...
@@ -199,12 +196,10 @@ process_args (p_argc, argv)
...
@@ -199,12 +196,10 @@ process_args (p_argc, argv)
}
}
}
}
}
}
extern
int
main
PARAMS
((
int
,
char
**
)
);
extern
int
main
(
int
,
char
**
);
int
int
main
(
argc
,
argv
)
main
(
int
argc
,
char
**
argv
)
int
argc
;
char
**
argv
;
{
{
int
i
,
j
;
int
i
,
j
;
int
done_an_ali
=
0
;
int
done_an_ali
=
0
;
...
...
gcc/ada/init.c
View file @
9373164a
...
@@ -71,28 +71,28 @@ extern struct Exception_Data tasking_error;
...
@@ -71,28 +71,28 @@ extern struct Exception_Data tasking_error;
extern
struct
Exception_Data
_abort_signal
;
extern
struct
Exception_Data
_abort_signal
;
#define Lock_Task system__soft_links__lock_task
#define Lock_Task system__soft_links__lock_task
extern
void
(
*
Lock_Task
)
PARAMS
((
void
)
);
extern
void
(
*
Lock_Task
)
(
void
);
#define Unlock_Task system__soft_links__unlock_task
#define Unlock_Task system__soft_links__unlock_task
extern
void
(
*
Unlock_Task
)
PARAMS
((
void
)
);
extern
void
(
*
Unlock_Task
)
(
void
);
#define Get_Machine_State_Addr \
#define Get_Machine_State_Addr \
system__soft_links__get_machine_state_addr
system__soft_links__get_machine_state_addr
extern
struct
Machine_State
*
(
*
Get_Machine_State_Addr
)
PARAMS
((
void
)
);
extern
struct
Machine_State
*
(
*
Get_Machine_State_Addr
)
(
void
);
#define Check_Abort_Status \
#define Check_Abort_Status \
system__soft_links__check_abort_status
system__soft_links__check_abort_status
extern
int
(
*
Check_Abort_Status
)
PARAMS
((
void
)
);
extern
int
(
*
Check_Abort_Status
)
(
void
);
#define Raise_From_Signal_Handler \
#define Raise_From_Signal_Handler \
ada__exceptions__raise_from_signal_handler
ada__exceptions__raise_from_signal_handler
extern
void
Raise_From_Signal_Handler
PARAMS
((
struct
Exception_Data
*
,
extern
void
Raise_From_Signal_Handler
(
struct
Exception_Data
*
,
const
char
*
);
const
char
*
));
#define Propagate_Signal_Exception \
#define Propagate_Signal_Exception \
__gnat_propagate_sig_exc
__gnat_propagate_sig_exc
extern
void
Propagate_Signal_Exception
extern
void
Propagate_Signal_Exception
(
struct
Machine_State
*
,
PARAMS
((
struct
Machine_State
*
,
struct
Exception_Data
*
,
const
char
*
));
struct
Exception_Data
*
,
const
char
*
);
/* Copies of global values computed by the binder */
/* Copies of global values computed by the binder */
int
__gl_main_priority
=
-
1
;
int
__gl_main_priority
=
-
1
;
...
@@ -134,8 +134,7 @@ char __gnat_get_interrupt_state (int);
...
@@ -134,8 +134,7 @@ char __gnat_get_interrupt_state (int);
's' Interrupt_State pragma set state to System */
's' Interrupt_State pragma set state to System */
char
char
__gnat_get_interrupt_state
(
intrup
)
__gnat_get_interrupt_state
(
int
intrup
)
int
intrup
;
{
{
if
(
intrup
>=
__gl_num_interrupt_states
)
if
(
intrup
>=
__gl_num_interrupt_states
)
return
'n'
;
return
'n'
;
...
@@ -156,30 +155,18 @@ __gnat_get_interrupt_state (intrup)
...
@@ -156,30 +155,18 @@ __gnat_get_interrupt_state (intrup)
boundaries like this are not handled correctly in all systems. */
boundaries like this are not handled correctly in all systems. */
void
void
__gnat_set_globals
(
main_priority
,
__gnat_set_globals
(
int
main_priority
,
time_slice_val
,
int
time_slice_val
,
wc_encoding
,
char
wc_encoding
,
locking_policy
,
char
locking_policy
,
queuing_policy
,
char
queuing_policy
,
task_dispatching_policy
,
char
task_dispatching_policy
,
restrictions
,
char
*
restrictions
,
interrupt_states
,
char
*
interrupt_states
,
num_interrupt_states
,
int
num_interrupt_states
,
unreserve_all_interrupts
,
int
unreserve_all_interrupts
,
exception_tracebacks
,
int
exception_tracebacks
,
zero_cost_exceptions
)
int
zero_cost_exceptions
)
int
main_priority
;
int
time_slice_val
;
char
wc_encoding
;
char
locking_policy
;
char
queuing_policy
;
char
task_dispatching_policy
;
char
*
restrictions
;
char
*
interrupt_states
;
int
num_interrupt_states
;
int
unreserve_all_interrupts
;
int
exception_tracebacks
;
int
zero_cost_exceptions
;
{
{
static
int
already_called
=
0
;
static
int
already_called
=
0
;
...
@@ -288,22 +275,20 @@ __gnat_set_globals (main_priority,
...
@@ -288,22 +275,20 @@ __gnat_set_globals (main_priority,
#ifndef _AIXVERSION_430
#ifndef _AIXVERSION_430
extern
int
nanosleep
PARAMS
((
struct
timestruc_t
*
,
struct
timestruc_t
*
)
);
extern
int
nanosleep
(
struct
timestruc_t
*
,
struct
timestruc_t
*
);
int
int
nanosleep
(
Rqtp
,
Rmtp
)
nanosleep
(
struct
timestruc_t
*
Rqtp
,
struct
timestruc_t
*
Rmtp
)
struct
timestruc_t
*
Rqtp
,
*
Rmtp
;
{
{
return
nsleep
(
Rqtp
,
Rmtp
);
return
nsleep
(
Rqtp
,
Rmtp
);
}
}
#endif
/* _AIXVERSION_430 */
#endif
/* _AIXVERSION_430 */
static
void
__gnat_error_handler
PARAMS
((
int
)
);
static
void
__gnat_error_handler
(
int
);
static
void
static
void
__gnat_error_handler
(
sig
)
__gnat_error_handler
(
int
sig
)
int
sig
;
{
{
struct
Exception_Data
*
exception
;
struct
Exception_Data
*
exception
;
const
char
*
msg
;
const
char
*
msg
;
...
@@ -335,7 +320,7 @@ __gnat_error_handler (sig)
...
@@ -335,7 +320,7 @@ __gnat_error_handler (sig)
}
}
void
void
__gnat_install_handler
()
__gnat_install_handler
(
void
)
{
{
struct
sigaction
act
;
struct
sigaction
act
;
...
@@ -363,7 +348,7 @@ __gnat_install_handler ()
...
@@ -363,7 +348,7 @@ __gnat_install_handler ()
}
}
void
void
__gnat_initialize
()
__gnat_initialize
(
void
)
{
{
}
}
...
@@ -380,20 +365,16 @@ __gnat_initialize ()
...
@@ -380,20 +365,16 @@ __gnat_initialize ()
#include <signal.h>
#include <signal.h>
#include <sys/siginfo.h>
#include <sys/siginfo.h>
static
void
__gnat_error_handler
PARAMS
((
int
,
siginfo_t
*
,
static
void
__gnat_error_handler
(
int
,
siginfo_t
*
,
struct
sigcontext
*
);
struct
sigcontext
*
));
extern
char
*
__gnat_get_code_loc
(
struct
sigcontext
*
);
extern
char
*
__gnat_get_code_loc
PARAMS
((
struct
sigcontext
*
));
extern
void
__gnat_enter_handler
(
struct
sigcontext
*
,
char
*
);
extern
void
__gnat_enter_handler
PARAMS
((
struct
sigcontext
*
,
char
*
));
extern
size_t
__gnat_machine_state_length
(
void
);
extern
size_t
__gnat_machine_state_length
PARAMS
((
void
));
extern
long
exc_lookup_gp
PARAMS
((
char
*
)
);
extern
long
exc_lookup_gp
(
char
*
);
extern
void
exc_resume
PARAMS
((
struct
sigcontext
*
)
);
extern
void
exc_resume
(
struct
sigcontext
*
);
static
void
static
void
__gnat_error_handler
(
sig
,
sip
,
context
)
__gnat_error_handler
(
int
sig
,
siginfo_t
*
sip
,
struct
sigcontext
*
context
)
int
sig
;
siginfo_t
*
sip
;
struct
sigcontext
*
context
;
{
{
struct
Exception_Data
*
exception
;
struct
Exception_Data
*
exception
;
static
int
recurse
=
0
;
static
int
recurse
=
0
;
...
@@ -463,7 +444,7 @@ __gnat_error_handler (sig, sip, context)
...
@@ -463,7 +444,7 @@ __gnat_error_handler (sig, sip, context)
}
}
void
void
__gnat_install_handler
()
__gnat_install_handler
(
void
)
{
{
struct
sigaction
act
;
struct
sigaction
act
;
...
@@ -471,7 +452,7 @@ __gnat_install_handler ()
...
@@ -471,7 +452,7 @@ __gnat_install_handler ()
exceptions. Make sure that the handler isn't interrupted by another
exceptions. Make sure that the handler isn't interrupted by another
signal that might cause a scheduling event! */
signal that might cause a scheduling event! */
act
.
sa_handler
=
(
void
(
*
)
PARAMS
((
int
)
))
__gnat_error_handler
;
act
.
sa_handler
=
(
void
(
*
)
(
int
))
__gnat_error_handler
;
act
.
sa_flags
=
SA_ONSTACK
|
SA_RESTART
|
SA_NODEFER
|
SA_SIGINFO
;
act
.
sa_flags
=
SA_ONSTACK
|
SA_RESTART
|
SA_NODEFER
|
SA_SIGINFO
;
sigemptyset
(
&
act
.
sa_mask
);
sigemptyset
(
&
act
.
sa_mask
);
...
@@ -491,7 +472,7 @@ __gnat_install_handler ()
...
@@ -491,7 +472,7 @@ __gnat_install_handler ()
}
}
void
void
__gnat_initialize
()
__gnat_initialize
(
void
)
{
{
}
}
...
@@ -500,16 +481,13 @@ __gnat_initialize ()
...
@@ -500,16 +481,13 @@ __gnat_initialize ()
#define SC_GP 29
#define SC_GP 29
char
*
char
*
__gnat_get_code_loc
(
context
)
__gnat_get_code_loc
(
struct
sigcontext
*
context
)
struct
sigcontext
*
context
;
{
{
return
(
char
*
)
context
->
sc_pc
;
return
(
char
*
)
context
->
sc_pc
;
}
}
void
void
__gnat_enter_handler
(
context
,
pc
)
__gnat_enter_handler
(
struct
sigcontext
*
context
,
char
*
pc
)
struct
sigcontext
*
context
;
char
*
pc
;
{
{
context
->
sc_pc
=
(
long
)
pc
;
context
->
sc_pc
=
(
long
)
pc
;
context
->
sc_regs
[
SC_GP
]
=
exc_lookup_gp
(
pc
);
context
->
sc_regs
[
SC_GP
]
=
exc_lookup_gp
(
pc
);
...
@@ -517,7 +495,7 @@ __gnat_enter_handler (context, pc)
...
@@ -517,7 +495,7 @@ __gnat_enter_handler (context, pc)
}
}
size_t
size_t
__gnat_machine_state_length
()
__gnat_machine_state_length
(
void
)
{
{
return
sizeof
(
struct
sigcontext
);
return
sizeof
(
struct
sigcontext
);
}
}
...
@@ -530,11 +508,10 @@ __gnat_machine_state_length ()
...
@@ -530,11 +508,10 @@ __gnat_machine_state_length ()
#include <signal.h>
#include <signal.h>
static
void
__gnat_error_handler
PARAMS
((
int
)
);
static
void
__gnat_error_handler
(
int
);
static
void
static
void
__gnat_error_handler
(
sig
)
__gnat_error_handler
(
int
sig
)
int
sig
;
{
{
struct
Exception_Data
*
exception
;
struct
Exception_Data
*
exception
;
char
*
msg
;
char
*
msg
;
...
@@ -566,7 +543,7 @@ __gnat_error_handler (sig)
...
@@ -566,7 +543,7 @@ __gnat_error_handler (sig)
}
}
void
void
__gnat_install_handler
()
__gnat_install_handler
(
void
)
{
{
struct
sigaction
act
;
struct
sigaction
act
;
...
@@ -609,7 +586,7 @@ __gnat_install_handler ()
...
@@ -609,7 +586,7 @@ __gnat_install_handler ()
}
}
void
void
__gnat_initialize
()
__gnat_initialize
(
void
)
{
{
}
}
...
@@ -639,11 +616,10 @@ struct Machine_State
...
@@ -639,11 +616,10 @@ struct Machine_State
unsigned
long
edi
;
unsigned
long
edi
;
};
};
static
void
__gnat_error_handler
PARAMS
((
int
)
);
static
void
__gnat_error_handler
(
int
);
static
void
static
void
__gnat_error_handler
(
sig
)
__gnat_error_handler
(
int
sig
)
int
sig
;
{
{
struct
Exception_Data
*
exception
;
struct
Exception_Data
*
exception
;
const
char
*
msg
;
const
char
*
msg
;
...
@@ -731,7 +707,7 @@ __gnat_error_handler (sig)
...
@@ -731,7 +707,7 @@ __gnat_error_handler (sig)
}
}
void
void
__gnat_install_handler
()
__gnat_install_handler
(
void
)
{
{
struct
sigaction
act
;
struct
sigaction
act
;
...
@@ -759,7 +735,7 @@ __gnat_install_handler ()
...
@@ -759,7 +735,7 @@ __gnat_install_handler ()
}
}
void
void
__gnat_initialize
()
__gnat_initialize
(
void
)
{
{
}
}
...
@@ -770,13 +746,12 @@ __gnat_initialize ()
...
@@ -770,13 +746,12 @@ __gnat_initialize ()
#elif defined (__MINGW32__)
#elif defined (__MINGW32__)
#include <windows.h>
#include <windows.h>
static
LONG
WINAPI
__gnat_error_handler
PARAMS
((
PEXCEPTION_POINTERS
)
);
static
LONG
WINAPI
__gnat_error_handler
(
PEXCEPTION_POINTERS
);
/* __gnat_initialize (mingw32). */
/* __gnat_initialize (mingw32). */
static
LONG
WINAPI
static
LONG
WINAPI
__gnat_error_handler
(
info
)
__gnat_error_handler
(
PEXCEPTION_POINTERS
info
)
PEXCEPTION_POINTERS
info
;
{
{
static
int
recurse
;
static
int
recurse
;
struct
Exception_Data
*
exception
;
struct
Exception_Data
*
exception
;
...
@@ -891,14 +866,14 @@ __gnat_error_handler (info)
...
@@ -891,14 +866,14 @@ __gnat_error_handler (info)
}
}
void
void
__gnat_install_handler
()
__gnat_install_handler
(
void
)
{
{
SetUnhandledExceptionFilter
(
__gnat_error_handler
);
SetUnhandledExceptionFilter
(
__gnat_error_handler
);
__gnat_handler_installed
=
1
;
__gnat_handler_installed
=
1
;
}
}
void
void
__gnat_initialize
()
__gnat_initialize
(
void
)
{
{
/* Initialize floating-point coprocessor. This call is needed because
/* Initialize floating-point coprocessor. This call is needed because
...
@@ -921,11 +896,10 @@ __gnat_initialize ()
...
@@ -921,11 +896,10 @@ __gnat_initialize ()
#include <signal.h>
#include <signal.h>
static
void
__gnat_error_handler
PARAMS
((
int
)
);
static
void
__gnat_error_handler
(
int
);
static
void
static
void
__gnat_error_handler
(
sig
)
__gnat_error_handler
(
int
sig
)
int
sig
;
{
{
struct
Exception_Data
*
exception
;
struct
Exception_Data
*
exception
;
char
*
msg
;
char
*
msg
;
...
@@ -956,7 +930,7 @@ __gnat_error_handler (sig)
...
@@ -956,7 +930,7 @@ __gnat_error_handler (sig)
}
}
void
void
__gnat_install_handler
()
__gnat_install_handler
(
void
)
{
{
struct
sigaction
act
;
struct
sigaction
act
;
...
@@ -982,7 +956,7 @@ __gnat_install_handler ()
...
@@ -982,7 +956,7 @@ __gnat_install_handler ()
}
}
void
void
__gnat_initialize
()
__gnat_initialize
(
void
)
{
{
__gnat_init_float
();
__gnat_init_float
();
}
}
...
@@ -994,7 +968,7 @@ __gnat_initialize ()
...
@@ -994,7 +968,7 @@ __gnat_initialize ()
#elif defined (__Lynx__)
#elif defined (__Lynx__)
void
void
__gnat_initialize
()
__gnat_initialize
(
void
)
{
{
__gnat_init_float
();
__gnat_init_float
();
}
}
...
@@ -1004,7 +978,7 @@ __gnat_initialize ()
...
@@ -1004,7 +978,7 @@ __gnat_initialize ()
/*********************************/
/*********************************/
void
void
__gnat_install_handler
()
__gnat_install_handler
(
void
)
{
{
__gnat_handler_installed
=
1
;
__gnat_handler_installed
=
1
;
}
}
...
@@ -1016,7 +990,7 @@ __gnat_install_handler ()
...
@@ -1016,7 +990,7 @@ __gnat_install_handler ()
#elif defined (__EMX__)
/* OS/2 dependent initialization */
#elif defined (__EMX__)
/* OS/2 dependent initialization */
void
void
__gnat_initialize
()
__gnat_initialize
(
void
)
{
{
}
}
...
@@ -1025,7 +999,7 @@ __gnat_initialize ()
...
@@ -1025,7 +999,7 @@ __gnat_initialize ()
/*********************************/
/*********************************/
void
void
__gnat_install_handler
()
__gnat_install_handler
(
void
)
{
{
__gnat_handler_installed
=
1
;
__gnat_handler_installed
=
1
;
}
}
...
@@ -1052,13 +1026,10 @@ struct Machine_State
...
@@ -1052,13 +1026,10 @@ struct Machine_State
sigcontext_t
context
;
sigcontext_t
context
;
};
};
static
void
__gnat_error_handler
PARAMS
((
int
,
int
,
sigcontext_t
*
)
);
static
void
__gnat_error_handler
(
int
,
int
,
sigcontext_t
*
);
static
void
static
void
__gnat_error_handler
(
sig
,
code
,
sc
)
__gnat_error_handler
(
int
sig
,
int
code
,
sigcontext_t
*
sc
)
int
sig
;
int
code
;
sigcontext_t
*
sc
;
{
{
struct
Machine_State
*
mstate
;
struct
Machine_State
*
mstate
;
struct
Exception_Data
*
exception
;
struct
Exception_Data
*
exception
;
...
@@ -1138,7 +1109,7 @@ __gnat_error_handler (sig, code, sc)
...
@@ -1138,7 +1109,7 @@ __gnat_error_handler (sig, code, sc)
}
}
void
void
__gnat_install_handler
()
__gnat_install_handler
(
void
)
{
{
struct
sigaction
act
;
struct
sigaction
act
;
...
@@ -1169,7 +1140,7 @@ __gnat_install_handler ()
...
@@ -1169,7 +1140,7 @@ __gnat_install_handler ()
}
}
void
void
__gnat_initialize
()
__gnat_initialize
(
void
)
{
{
}
}
...
@@ -1182,12 +1153,10 @@ __gnat_initialize ()
...
@@ -1182,12 +1153,10 @@ __gnat_initialize ()
#include <signal.h>
#include <signal.h>
#include <siginfo.h>
#include <siginfo.h>
static
void
__gnat_error_handler
PARAMS
((
int
,
siginfo_t
*
)
);
static
void
__gnat_error_handler
(
int
,
siginfo_t
*
);
static
void
static
void
__gnat_error_handler
(
sig
,
sip
)
__gnat_error_handler
(
int
sig
,
siginfo_t
*
sip
)
int
sig
;
siginfo_t
*
sip
;
{
{
struct
Exception_Data
*
exception
;
struct
Exception_Data
*
exception
;
static
int
recurse
=
0
;
static
int
recurse
=
0
;
...
@@ -1253,7 +1222,7 @@ __gnat_error_handler (sig, sip)
...
@@ -1253,7 +1222,7 @@ __gnat_error_handler (sig, sip)
}
}
void
void
__gnat_install_handler
()
__gnat_install_handler
(
void
)
{
{
struct
sigaction
act
;
struct
sigaction
act
;
...
@@ -1279,7 +1248,7 @@ __gnat_install_handler ()
...
@@ -1279,7 +1248,7 @@ __gnat_install_handler ()
}
}
void
void
__gnat_initialize
()
__gnat_initialize
(
void
)
{
{
}
}
...
@@ -1291,7 +1260,7 @@ __gnat_initialize ()
...
@@ -1291,7 +1260,7 @@ __gnat_initialize ()
/* The prehandler actually gets control first on a condition. It swaps the
/* The prehandler actually gets control first on a condition. It swaps the
stack pointer and calls the handler (__gnat_error_handler). */
stack pointer and calls the handler (__gnat_error_handler). */
extern
long
__gnat_error_prehandler
();
extern
long
__gnat_error_prehandler
(
void
);
extern
char
*
__gnat_error_prehandler_stack
;
/* Alternate signal stack */
extern
char
*
__gnat_error_prehandler_stack
;
/* Alternate signal stack */
...
@@ -1329,12 +1298,10 @@ extern struct Exception_Data *Coded_Exception (int);
...
@@ -1329,12 +1298,10 @@ extern struct Exception_Data *Coded_Exception (int);
struct
descriptor_s
{
unsigned
short
len
,
mbz
;
char
*
adr
;
};
struct
descriptor_s
{
unsigned
short
len
,
mbz
;
char
*
adr
;
};
long
__gnat_error_handler
PARAMS
((
int
*
,
void
*
)
);
long
__gnat_error_handler
(
int
*
,
void
*
);
long
long
__gnat_error_handler
(
sigargs
,
mechargs
)
__gnat_error_handler
(
int
*
sigargs
,
void
*
mechargs
)
int
*
sigargs
;
void
*
mechargs
;
{
{
struct
Exception_Data
*
exception
=
0
;
struct
Exception_Data
*
exception
=
0
;
char
*
msg
=
""
;
char
*
msg
=
""
;
...
@@ -1470,7 +1437,7 @@ __gnat_error_handler (sigargs, mechargs)
...
@@ -1470,7 +1437,7 @@ __gnat_error_handler (sigargs, mechargs)
}
}
void
void
__gnat_install_handler
()
__gnat_install_handler
(
void
)
{
{
long
prvhnd
;
long
prvhnd
;
char
*
c
;
char
*
c
;
...
@@ -1485,7 +1452,7 @@ __gnat_install_handler ()
...
@@ -1485,7 +1452,7 @@ __gnat_install_handler ()
}
}
void
void
__gnat_initialize
()
__gnat_initialize
(
void
)
{
{
}
}
...
@@ -1508,10 +1475,10 @@ static void __gnat_error_handler (int, int, struct sigcontext *);
...
@@ -1508,10 +1475,10 @@ static void __gnat_error_handler (int, int, struct sigcontext *);
/* getpid is used by s-parint.adb, but is not defined by VxWorks, except
/* getpid is used by s-parint.adb, but is not defined by VxWorks, except
on Alpha VxWorks */
on Alpha VxWorks */
extern
long
getpid
PARAMS
((
void
)
);
extern
long
getpid
(
void
);
long
long
getpid
()
getpid
(
void
)
{
{
return
taskIdSelf
();
return
taskIdSelf
();
}
}
...
@@ -1519,17 +1486,13 @@ getpid ()
...
@@ -1519,17 +1486,13 @@ getpid ()
/* This is needed by the GNAT run time to handle Vxworks interrupts */
/* This is needed by the GNAT run time to handle Vxworks interrupts */
int
int
__gnat_inum_to_ivec
(
num
)
__gnat_inum_to_ivec
(
int
num
)
int
num
;
{
{
return
INUM_TO_IVEC
(
num
);
return
INUM_TO_IVEC
(
num
);
}
}
static
void
static
void
__gnat_error_handler
(
sig
,
code
,
sc
)
__gnat_error_handler
(
int
sig
,
int
code
,
struct
sigcontext
*
sc
)
int
sig
;
int
code
;
struct
sigcontext
*
sc
;
{
{
struct
Exception_Data
*
exception
;
struct
Exception_Data
*
exception
;
sigset_t
mask
;
sigset_t
mask
;
...
@@ -1576,7 +1539,7 @@ __gnat_error_handler (sig, code, sc)
...
@@ -1576,7 +1539,7 @@ __gnat_error_handler (sig, code, sc)
}
}
void
void
__gnat_install_handler
()
__gnat_install_handler
(
void
)
{
{
struct
sigaction
act
;
struct
sigaction
act
;
...
@@ -1601,7 +1564,7 @@ __gnat_install_handler ()
...
@@ -1601,7 +1564,7 @@ __gnat_install_handler ()
#define HAVE_GNAT_INIT_FLOAT
#define HAVE_GNAT_INIT_FLOAT
void
void
__gnat_init_float
()
__gnat_init_float
(
void
)
{
{
/* Disable overflow/underflow exceptions on the PPC processor, this is needed
/* Disable overflow/underflow exceptions on the PPC processor, this is needed
to get correct Ada semantic. */
to get correct Ada semantic. */
...
@@ -1631,7 +1594,7 @@ __gnat_init_float ()
...
@@ -1631,7 +1594,7 @@ __gnat_init_float ()
}
}
void
void
__gnat_initialize
()
__gnat_initialize
(
void
)
{
{
__gnat_init_float
();
__gnat_init_float
();
...
@@ -1661,8 +1624,7 @@ __gnat_initialize ()
...
@@ -1661,8 +1624,7 @@ __gnat_initialize ()
#include <unistd.h>
#include <unistd.h>
static
void
static
void
__gnat_error_handler
(
sig
)
__gnat_error_handler
(
int
sig
)
int
sig
;
{
{
struct
Exception_Data
*
exception
;
struct
Exception_Data
*
exception
;
const
char
*
msg
;
const
char
*
msg
;
...
@@ -1694,7 +1656,7 @@ __gnat_error_handler (sig)
...
@@ -1694,7 +1656,7 @@ __gnat_error_handler (sig)
}
}
void
void
__gnat_install_handler
()
__gnat_install_handler
(
void
)
{
{
struct
sigaction
act
;
struct
sigaction
act
;
...
@@ -1714,7 +1676,7 @@ __gnat_install_handler()
...
@@ -1714,7 +1676,7 @@ __gnat_install_handler()
}
}
void
void
__gnat_initialize
()
__gnat_initialize
(
void
)
{
{
__gnat_install_handler
();
__gnat_install_handler
();
__gnat_init_float
();
__gnat_init_float
();
...
@@ -1726,12 +1688,12 @@ __gnat_initialize ()
...
@@ -1726,12 +1688,12 @@ __gnat_initialize ()
#elif defined(__rtems__)
#elif defined(__rtems__)
extern
void
__gnat_install_handler
();
extern
void
__gnat_install_handler
(
void
);
/* For RTEMS, each bsp will provide a custom __gnat_install_handler (). */
/* For RTEMS, each bsp will provide a custom __gnat_install_handler (). */
void
void
__gnat_initialize
()
__gnat_initialize
(
void
)
{
{
__gnat_install_handler
();
__gnat_install_handler
();
}
}
...
@@ -1742,12 +1704,12 @@ __gnat_initialize ()
...
@@ -1742,12 +1704,12 @@ __gnat_initialize ()
#elif defined(__rtems__)
#elif defined(__rtems__)
extern
void
__gnat_install_handler
();
extern
void
__gnat_install_handler
(
void
);
/* For RTEMS, each bsp will provide a custom __gnat_install_handler (). */
/* For RTEMS, each bsp will provide a custom __gnat_install_handler (). */
void
void
__gnat_initialize
()
__gnat_initialize
(
void
)
{
{
__gnat_install_handler
();
__gnat_install_handler
();
}
}
...
@@ -1762,7 +1724,7 @@ __gnat_initialize ()
...
@@ -1762,7 +1724,7 @@ __gnat_initialize ()
/***************************************/
/***************************************/
void
void
__gnat_initialize
()
__gnat_initialize
(
void
)
{
{
}
}
...
@@ -1771,7 +1733,7 @@ __gnat_initialize ()
...
@@ -1771,7 +1733,7 @@ __gnat_initialize ()
/********************************************/
/********************************************/
void
void
__gnat_install_handler
()
__gnat_install_handler
(
void
)
{
{
__gnat_handler_installed
=
1
;
__gnat_handler_installed
=
1
;
}
}
...
@@ -1792,7 +1754,7 @@ __gnat_install_handler ()
...
@@ -1792,7 +1754,7 @@ __gnat_install_handler ()
#define HAVE_GNAT_INIT_FLOAT
#define HAVE_GNAT_INIT_FLOAT
void
void
__gnat_init_float
()
__gnat_init_float
(
void
)
{
{
#if defined (__i386__) || defined (i386)
#if defined (__i386__) || defined (i386)
...
@@ -1809,7 +1771,7 @@ __gnat_init_float ()
...
@@ -1809,7 +1771,7 @@ __gnat_init_float ()
/* All targets without a specific __gnat_init_float will use an empty one */
/* All targets without a specific __gnat_init_float will use an empty one */
void
void
__gnat_init_float
()
__gnat_init_float
(
void
)
{
{
}
}
#endif
#endif
gcc/ada/misc.c
View file @
9373164a
...
@@ -359,7 +359,7 @@ gnat_tree_size (enum tree_code code)
...
@@ -359,7 +359,7 @@ gnat_tree_size (enum tree_code code)
/* Perform all the initialization steps that are language-specific. */
/* Perform all the initialization steps that are language-specific. */
static
bool
static
bool
gnat_init
()
gnat_init
(
void
)
{
{
/* Performs whatever initialization steps needed by the language-dependent
/* Performs whatever initialization steps needed by the language-dependent
lexical analyzer. */
lexical analyzer. */
...
@@ -396,7 +396,7 @@ gnat_finish_incomplete_decl (tree dont_care ATTRIBUTE_UNUSED)
...
@@ -396,7 +396,7 @@ gnat_finish_incomplete_decl (tree dont_care ATTRIBUTE_UNUSED)
objects. */
objects. */
void
void
gnat_compute_largest_alignment
()
gnat_compute_largest_alignment
(
void
)
{
{
enum
machine_mode
mode
;
enum
machine_mode
mode
;
...
@@ -413,7 +413,7 @@ gnat_compute_largest_alignment ()
...
@@ -413,7 +413,7 @@ gnat_compute_largest_alignment ()
various language dependent hooks. */
various language dependent hooks. */
void
void
gnat_init_gcc_eh
()
gnat_init_gcc_eh
(
void
)
{
{
/* We shouldn't do anything if the No_Exceptions_Handler pragma is set,
/* We shouldn't do anything if the No_Exceptions_Handler pragma is set,
though. This could for instance lead to the emission of tables with
though. This could for instance lead to the emission of tables with
...
...
gcc/ada/mkdir.c
View file @
9373164a
...
@@ -48,8 +48,7 @@
...
@@ -48,8 +48,7 @@
/* This function provides a portable binding to the mkdir function. */
/* This function provides a portable binding to the mkdir function. */
int
int
__gnat_mkdir
(
dir_name
)
__gnat_mkdir
(
char
*
dir_name
)
char
*
dir_name
;
{
{
#if defined (_WIN32) || defined (__vxworks)
#if defined (_WIN32) || defined (__vxworks)
return
mkdir
(
dir_name
);
return
mkdir
(
dir_name
);
...
...
gcc/ada/raise.c
View file @
9373164a
...
@@ -58,9 +58,7 @@ typedef char bool;
...
@@ -58,9 +58,7 @@ typedef char bool;
/* We have not yet figured out how to import this directly */
/* We have not yet figured out how to import this directly */
void
void
_gnat_builtin_longjmp
(
ptr
,
flag
)
_gnat_builtin_longjmp
(
void
*
ptr
,
int
flag
ATTRIBUTE_UNUSED
)
void
*
ptr
;
int
flag
ATTRIBUTE_UNUSED
;
{
{
__builtin_longjmp
(
ptr
,
1
);
__builtin_longjmp
(
ptr
,
1
);
}
}
...
@@ -72,7 +70,7 @@ _gnat_builtin_longjmp (ptr, flag)
...
@@ -72,7 +70,7 @@ _gnat_builtin_longjmp (ptr, flag)
performs any system dependent cleanup required. */
performs any system dependent cleanup required. */
void
void
__gnat_unhandled_terminate
()
__gnat_unhandled_terminate
(
void
)
{
{
/* Special termination handling for VMS */
/* Special termination handling for VMS */
...
@@ -108,10 +106,10 @@ typedef struct _Unwind_Context _Unwind_Context;
...
@@ -108,10 +106,10 @@ typedef struct _Unwind_Context _Unwind_Context;
typedef
struct
_Unwind_Exception
_Unwind_Exception
;
typedef
struct
_Unwind_Exception
_Unwind_Exception
;
_Unwind_Reason_Code
_Unwind_Reason_Code
__gnat_Unwind_RaiseException
PARAMS
((
_Unwind_Exception
*
)
);
__gnat_Unwind_RaiseException
(
_Unwind_Exception
*
);
_Unwind_Reason_Code
_Unwind_Reason_Code
__gnat_Unwind_ForcedUnwind
PARAMS
((
_Unwind_Exception
*
,
void
*
,
void
*
)
);
__gnat_Unwind_ForcedUnwind
(
_Unwind_Exception
*
,
void
*
,
void
*
);
#ifdef IN_RTS
/* For eh personality routine */
#ifdef IN_RTS
/* For eh personality routine */
...
@@ -540,9 +538,7 @@ typedef struct
...
@@ -540,9 +538,7 @@ typedef struct
}
region_descriptor
;
}
region_descriptor
;
static
void
static
void
db_region_for
(
region
,
uw_context
)
db_region_for
(
region_descriptor
*
region
,
_Unwind_Context
*
uw_context
)
region_descriptor
*
region
;
_Unwind_Context
*
uw_context
;
{
{
_Unwind_Ptr
ip
=
_Unwind_GetIP
(
uw_context
)
-
1
;
_Unwind_Ptr
ip
=
_Unwind_GetIP
(
uw_context
)
-
1
;
...
@@ -563,9 +559,7 @@ db_region_for (region, uw_context)
...
@@ -563,9 +559,7 @@ db_region_for (region, uw_context)
ttype table. */
ttype table. */
static
const
_Unwind_Ptr
static
const
_Unwind_Ptr
get_ttype_entry_for
(
region
,
filter
)
get_ttype_entry_for
(
region_descriptor
*
region
,
long
filter
)
region_descriptor
*
region
;
long
filter
;
{
{
_Unwind_Ptr
ttype_entry
;
_Unwind_Ptr
ttype_entry
;
...
@@ -580,9 +574,8 @@ get_ttype_entry_for (region, filter)
...
@@ -580,9 +574,8 @@ get_ttype_entry_for (region, filter)
/* Fill out the REGION descriptor for the provided UW_CONTEXT. */
/* Fill out the REGION descriptor for the provided UW_CONTEXT. */
static
void
static
void
get_region_description_for
(
uw_context
,
region
)
get_region_description_for
(
_Unwind_Context
*
uw_context
,
_Unwind_Context
*
uw_context
;
region_descriptor
*
region
)
region_descriptor
*
region
;
{
{
const
unsigned
char
*
p
;
const
unsigned
char
*
p
;
_Unwind_Word
tmp
;
_Unwind_Word
tmp
;
...
@@ -674,9 +667,7 @@ typedef struct
...
@@ -674,9 +667,7 @@ typedef struct
static
void
static
void
db_action_for
(
action
,
uw_context
)
db_action_for
(
action_descriptor
*
action
,
_Unwind_Context
*
uw_context
)
action_descriptor
*
action
;
_Unwind_Context
*
uw_context
;
{
{
_Unwind_Ptr
ip
=
_Unwind_GetIP
(
uw_context
)
-
1
;
_Unwind_Ptr
ip
=
_Unwind_GetIP
(
uw_context
)
-
1
;
...
@@ -725,10 +716,9 @@ db_action_for (action, uw_context)
...
@@ -725,10 +716,9 @@ db_action_for (action, uw_context)
#define __builtin_eh_return_data_regno(x) x
#define __builtin_eh_return_data_regno(x) x
static
void
static
void
get_call_site_action_for
(
uw_context
,
region
,
action
)
get_call_site_action_for
(
_Unwind_Context
*
uw_context
,
_Unwind_Context
*
uw_context
;
region_descriptor
*
region
,
region_descriptor
*
region
;
action_descriptor
*
action
)
action_descriptor
*
action
;
{
{
_Unwind_Ptr
call_site
_Unwind_Ptr
call_site
=
_Unwind_GetIP
(
uw_context
)
-
1
;
=
_Unwind_GetIP
(
uw_context
)
-
1
;
...
@@ -786,10 +776,9 @@ get_call_site_action_for (uw_context, region, action)
...
@@ -786,10 +776,9 @@ get_call_site_action_for (uw_context, region, action)
/* ! __USING_SJLJ_EXCEPTIONS__ */
/* ! __USING_SJLJ_EXCEPTIONS__ */
static
void
static
void
get_call_site_action_for
(
uw_context
,
region
,
action
)
get_call_site_action_for
(
_Unwind_Context
*
uw_context
,
_Unwind_Context
*
uw_context
;
region_descriptor
*
region
,
region_descriptor
*
region
;
action_descriptor
*
action
)
action_descriptor
*
action
;
{
{
_Unwind_Ptr
ip
_Unwind_Ptr
ip
=
_Unwind_GetIP
(
uw_context
)
-
1
;
=
_Unwind_GetIP
(
uw_context
)
-
1
;
...
@@ -861,11 +850,10 @@ get_call_site_action_for (uw_context, region, action)
...
@@ -861,11 +850,10 @@ get_call_site_action_for (uw_context, region, action)
UW_CONTEXT in REGION. */
UW_CONTEXT in REGION. */
static
void
static
void
get_action_description_for
(
uw_context
,
uw_exception
,
region
,
action
)
get_action_description_for
(
_Unwind_Context
*
uw_context
,
_Unwind_Context
*
uw_context
;
_Unwind_Exception
*
uw_exception
,
_Unwind_Exception
*
uw_exception
;
region_descriptor
*
regionr
,
region_descriptor
*
region
;
action_descriptor
*
actionr
)
action_descriptor
*
action
;
{
{
_GNAT_Exception
*
gnat_exception
=
(
_GNAT_Exception
*
)
uw_exception
;
_GNAT_Exception
*
gnat_exception
=
(
_GNAT_Exception
*
)
uw_exception
;
...
@@ -950,11 +938,10 @@ get_action_description_for (uw_context, uw_exception, region, action)
...
@@ -950,11 +938,10 @@ get_action_description_for (uw_context, uw_exception, region, action)
occured. */
occured. */
static
void
static
void
setup_to_install
(
uw_context
,
uw_exception
,
uw_landing_pad
,
uw_filter
)
setup_to_install
(
_Unwind_Context
*
uw_context
,
_Unwind_Context
*
uw_context
;
_Unwind_Exception
*
uw_exception
,
_Unwind_Exception
*
uw_exception
;
int
uw_filter
,
int
uw_filter
;
_Unwind_Ptr
uw_landing_pad
)
_Unwind_Ptr
uw_landing_pad
;
{
{
#ifndef EH_RETURN_DATA_REGNO
#ifndef EH_RETURN_DATA_REGNO
/* We should not be called if the appropriate underlying support is not
/* We should not be called if the appropriate underlying support is not
...
@@ -981,20 +968,18 @@ setup_to_install (uw_context, uw_exception, uw_landing_pad, uw_filter)
...
@@ -981,20 +968,18 @@ setup_to_install (uw_context, uw_exception, uw_landing_pad, uw_filter)
/* The following is defined from a-except.adb. Its purpose is to enable
/* The following is defined from a-except.adb. Its purpose is to enable
automatic backtraces upon exception raise, as provided through the
automatic backtraces upon exception raise, as provided through the
GNAT.Traceback facilities. */
GNAT.Traceback facilities. */
extern
void
__gnat_notify_handled_exception
PARAMS
((
void
)
);
extern
void
__gnat_notify_handled_exception
(
void
);
extern
void
__gnat_notify_unhandled_exception
PARAMS
((
void
)
);
extern
void
__gnat_notify_unhandled_exception
(
void
);
/* Below is the eh personality routine per se. We currently assume that only
/* Below is the eh personality routine per se. We currently assume that only
GNU-Ada exceptions are met. */
GNU-Ada exceptions are met. */
_Unwind_Reason_Code
_Unwind_Reason_Code
__gnat_eh_personality
(
uw_version
,
uw_phases
,
__gnat_eh_personality
(
int
uw_version
,
uw_exception_class
,
uw_exception
,
uw_context
)
_Unwind_Action
uw_phases
,
int
uw_version
;
_Unwind_Exception_Class
uw_exception_class
,
_Unwind_Action
uw_phases
;
_Unwind_Exception
*
uw_exception
,
_Unwind_Exception_Class
uw_exception_class
;
_Unwind_Context
*
uw_context
)
_Unwind_Exception
*
uw_exception
;
_Unwind_Context
*
uw_context
;
{
{
_GNAT_Exception
*
gnat_exception
=
(
_GNAT_Exception
*
)
uw_exception
;
_GNAT_Exception
*
gnat_exception
=
(
_GNAT_Exception
*
)
uw_exception
;
...
@@ -1075,8 +1060,7 @@ __gnat_eh_personality (uw_version, uw_phases,
...
@@ -1075,8 +1060,7 @@ __gnat_eh_personality (uw_version, uw_phases,
#undef _Unwind_RaiseException
#undef _Unwind_RaiseException
_Unwind_Reason_Code
_Unwind_Reason_Code
__gnat_Unwind_RaiseException
(
e
)
__gnat_Unwind_RaiseException
(
_Unwind_Exception
*
e
)
_Unwind_Exception
*
e
;
{
{
return
_Unwind_SjLj_RaiseException
(
e
);
return
_Unwind_SjLj_RaiseException
(
e
);
}
}
...
@@ -1085,10 +1069,9 @@ __gnat_Unwind_RaiseException (e)
...
@@ -1085,10 +1069,9 @@ __gnat_Unwind_RaiseException (e)
#undef _Unwind_ForcedUnwind
#undef _Unwind_ForcedUnwind
_Unwind_Reason_Code
_Unwind_Reason_Code
__gnat_Unwind_ForcedUnwind
(
e
,
handler
,
argument
)
__gnat_Unwind_ForcedUnwind
(
_Unwind_Exception
*
e
,
_Unwind_Exception
*
e
;
void
*
handler
,
void
*
handler
;
void
*
argument
)
void
*
argument
;
{
{
return
_Unwind_SjLj_ForcedUnwind
(
e
,
handler
,
argument
);
return
_Unwind_SjLj_ForcedUnwind
(
e
,
handler
,
argument
);
}
}
...
@@ -1097,17 +1080,15 @@ __gnat_Unwind_ForcedUnwind (e, handler, argument)
...
@@ -1097,17 +1080,15 @@ __gnat_Unwind_ForcedUnwind (e, handler, argument)
#else
/* __USING_SJLJ_EXCEPTIONS__ */
#else
/* __USING_SJLJ_EXCEPTIONS__ */
_Unwind_Reason_Code
_Unwind_Reason_Code
__gnat_Unwind_RaiseException
(
e
)
__gnat_Unwind_RaiseException
(
_Unwind_Exception
*
e
)
_Unwind_Exception
*
e
;
{
{
return
_Unwind_RaiseException
(
e
);
return
_Unwind_RaiseException
(
e
);
}
}
_Unwind_Reason_Code
_Unwind_Reason_Code
__gnat_Unwind_ForcedUnwind
(
e
,
handler
,
argument
)
__gnat_Unwind_ForcedUnwind
(
_Unwind_Exception
*
e
,
_Unwind_Exception
*
e
;
void
*
handler
,
void
*
handler
;
void
*
argument
)
void
*
argument
;
{
{
return
_Unwind_ForcedUnwind
(
e
,
handler
,
argument
);
return
_Unwind_ForcedUnwind
(
e
,
handler
,
argument
);
}
}
...
@@ -1127,18 +1108,16 @@ __gnat_Unwind_ForcedUnwind (e, handler, argument)
...
@@ -1127,18 +1108,16 @@ __gnat_Unwind_ForcedUnwind (e, handler, argument)
functions never to be called. */
functions never to be called. */
_Unwind_Reason_Code
_Unwind_Reason_Code
__gnat_Unwind_RaiseException
(
e
)
__gnat_Unwind_RaiseException
(
_Unwind_Exception
*
e
ATTRIBUTE_UNUSED
)
_Unwind_Exception
*
e
ATTRIBUTE_UNUSED
;
{
{
abort
();
abort
();
}
}
_Unwind_Reason_Code
_Unwind_Reason_Code
__gnat_Unwind_ForcedUnwind
(
e
,
handler
,
argument
)
__gnat_Unwind_ForcedUnwind
(
_Unwind_Exception
*
e
ATTRIBUTE_UNUSED
,
_Unwind_Exception
*
e
ATTRIBUTE_UNUSED
;
void
*
handler
ATTRIBUTE_UNUSED
,
void
*
handler
ATTRIBUTE_UNUSED
;
void
*
argument
ATTRIBUTE_UNUSED
)
void
*
argument
ATTRIBUTE_UNUSED
;
{
{
abort
();
abort
();
}
}
...
...
gcc/ada/socket.c
View file @
9373164a
...
@@ -66,19 +66,18 @@
...
@@ -66,19 +66,18 @@
#include "raise.h"
#include "raise.h"
extern
void
__gnat_free_socket_set
PARAMS
((
fd_set
*
)
);
extern
void
__gnat_free_socket_set
(
fd_set
*
);
extern
void
__gnat_last_socket_in_set
PARAMS
((
fd_set
*
,
int
*
)
);
extern
void
__gnat_last_socket_in_set
(
fd_set
*
,
int
*
);
extern
void
__gnat_get_socket_from_set
PARAMS
((
fd_set
*
,
int
*
,
int
*
)
);
extern
void
__gnat_get_socket_from_set
(
fd_set
*
,
int
*
,
int
*
);
extern
void
__gnat_insert_socket_in_set
PARAMS
((
fd_set
*
,
int
)
);
extern
void
__gnat_insert_socket_in_set
(
fd_set
*
,
int
);
extern
int
__gnat_is_socket_in_set
PARAMS
((
fd_set
*
,
int
)
);
extern
int
__gnat_is_socket_in_set
(
fd_set
*
,
int
);
extern
fd_set
*
__gnat_new_socket_set
PARAMS
((
fd_set
*
)
);
extern
fd_set
*
__gnat_new_socket_set
(
fd_set
*
);
extern
void
__gnat_remove_socket_from_set
PARAMS
((
fd_set
*
,
int
)
);
extern
void
__gnat_remove_socket_from_set
(
fd_set
*
,
int
);
/* Free socket set. */
/* Free socket set. */
void
void
__gnat_free_socket_set
(
set
)
__gnat_free_socket_set
(
fd_set
*
set
)
fd_set
*
set
;
{
{
__gnat_free
(
set
);
__gnat_free
(
set
);
}
}
...
@@ -89,9 +88,7 @@ __gnat_free_socket_set (set)
...
@@ -89,9 +88,7 @@ __gnat_free_socket_set (set)
actual largest socket in the socket set. */
actual largest socket in the socket set. */
void
void
__gnat_last_socket_in_set
(
set
,
last
)
__gnat_last_socket_in_set
(
fd_set
*
set
,
int
*
last
)
fd_set
*
set
;
int
*
last
;
{
{
int
s
;
int
s
;
int
l
;
int
l
;
...
@@ -122,10 +119,7 @@ __gnat_last_socket_in_set (set, last)
...
@@ -122,10 +119,7 @@ __gnat_last_socket_in_set (set, last)
socket in the socket set. */
socket in the socket set. */
void
void
__gnat_get_socket_from_set
(
set
,
last
,
socket
)
__gnat_get_socket_from_set
(
fd_set
*
set
,
int
*
last
,
int
*
socket
)
fd_set
*
set
;
int
*
last
;
int
*
socket
;
{
{
*
socket
=
*
last
;
*
socket
=
*
last
;
FD_CLR
(
*
socket
,
set
);
FD_CLR
(
*
socket
,
set
);
...
@@ -135,9 +129,7 @@ __gnat_get_socket_from_set (set, last, socket)
...
@@ -135,9 +129,7 @@ __gnat_get_socket_from_set (set, last, socket)
/* Insert SOCKET in the socket set SET. */
/* Insert SOCKET in the socket set SET. */
void
void
__gnat_insert_socket_in_set
(
set
,
socket
)
__gnat_insert_socket_in_set
(
fd_set
*
set
,
int
socket
)
fd_set
*
set
;
int
socket
;
{
{
FD_SET
(
socket
,
set
);
FD_SET
(
socket
,
set
);
}
}
...
@@ -145,9 +137,7 @@ __gnat_insert_socket_in_set (set, socket)
...
@@ -145,9 +137,7 @@ __gnat_insert_socket_in_set (set, socket)
/* Check whether a given SOCKET is in the socket set SET. */
/* Check whether a given SOCKET is in the socket set SET. */
int
int
__gnat_is_socket_in_set
(
set
,
socket
)
__gnat_is_socket_in_set
(
fd_set
*
set
,
int
socket
)
fd_set
*
set
;
int
socket
;
{
{
return
FD_ISSET
(
socket
,
set
);
return
FD_ISSET
(
socket
,
set
);
}
}
...
@@ -155,8 +145,7 @@ __gnat_is_socket_in_set (set, socket)
...
@@ -155,8 +145,7 @@ __gnat_is_socket_in_set (set, socket)
/* Allocate a new socket set and set it as empty. */
/* Allocate a new socket set and set it as empty. */
fd_set
*
fd_set
*
__gnat_new_socket_set
(
set
)
__gnat_new_socket_set
(
fd_set
*
set
)
fd_set
*
set
;
{
{
fd_set
*
new
;
fd_set
*
new
;
...
@@ -173,9 +162,7 @@ __gnat_new_socket_set (set)
...
@@ -173,9 +162,7 @@ __gnat_new_socket_set (set)
/* Remove SOCKET from the socket set SET. */
/* Remove SOCKET from the socket set SET. */
void
void
__gnat_remove_socket_from_set
(
set
,
socket
)
__gnat_remove_socket_from_set
(
fd_set
*
set
,
int
socket
)
fd_set
*
set
;
int
socket
;
{
{
FD_CLR
(
socket
,
set
);
FD_CLR
(
socket
,
set
);
}
}
gcc/ada/sysdep.c
View file @
9373164a
...
@@ -157,15 +157,13 @@ static const char *mode_append_binary_plus = "a+b";
...
@@ -157,15 +157,13 @@ static const char *mode_append_binary_plus = "a+b";
const
char
__gnat_text_translation_required
=
1
;
const
char
__gnat_text_translation_required
=
1
;
void
void
__gnat_set_binary_mode
(
handle
)
__gnat_set_binary_mode
(
int
handle
)
int
handle
;
{
{
_setmode
(
handle
,
O_BINARY
);
_setmode
(
handle
,
O_BINARY
);
}
}
void
void
__gnat_set_text_mode
(
handle
)
__gnat_set_text_mode
(
int
handle
)
int
handle
;
{
{
_setmode
(
handle
,
O_TEXT
);
_setmode
(
handle
,
O_TEXT
);
}
}
...
@@ -178,8 +176,7 @@ __gnat_set_text_mode (handle)
...
@@ -178,8 +176,7 @@ __gnat_set_text_mode (handle)
"console". */
"console". */
char
*
char
*
__gnat_ttyname
(
filedes
)
__gnat_ttyname
(
int
filedes
)
int
filedes
;
{
{
if
(
isatty
(
filedes
))
if
(
isatty
(
filedes
))
return
"console"
;
return
"console"
;
...
@@ -206,22 +203,22 @@ __gnat_ttyname (filedes)
...
@@ -206,22 +203,22 @@ __gnat_ttyname (filedes)
Calling FlushConsoleInputBuffer just after getch() fix the bug under
Calling FlushConsoleInputBuffer just after getch() fix the bug under
95/98. */
95/98. */
static
void
winflush_init
PARAMS
((
void
)
);
static
void
winflush_init
(
void
);
static
void
winflush_95
PARAMS
((
void
)
);
static
void
winflush_95
(
void
);
static
void
winflush_nt
PARAMS
((
void
)
);
static
void
winflush_nt
(
void
);
/* winflusfunction is set first to the winflushinit function which will check
/* winflusfunction is set first to the winflushinit function which will check
the OS version 95/98 or NT/2000 */
the OS version 95/98 or NT/2000 */
static
void
(
*
winflush_function
)
PARAMS
((
void
)
)
=
winflush_init
;
static
void
(
*
winflush_function
)
(
void
)
=
winflush_init
;
/* This function does the runtime check of the OS version and then sets
/* This function does the runtime check of the OS version and then sets
winflush_function to the appropriate function and then call it. */
winflush_function to the appropriate function and then call it. */
static
void
static
void
winflush_init
()
winflush_init
(
void
)
{
{
DWORD
dwVersion
=
GetVersion
();
DWORD
dwVersion
=
GetVersion
();
...
@@ -234,12 +231,12 @@ winflush_init ()
...
@@ -234,12 +231,12 @@ winflush_init ()
}
}
static
void
winflush_95
()
static
void
winflush_95
(
void
)
{
{
FlushConsoleInputBuffer
(
GetStdHandle
(
STD_INPUT_HANDLE
));
FlushConsoleInputBuffer
(
GetStdHandle
(
STD_INPUT_HANDLE
));
}
}
static
void
winflush_nt
()
static
void
winflush_nt
(
void
)
{
{
/* Does nothing as there is no problem under NT. */
/* Does nothing as there is no problem under NT. */
}
}
...
@@ -264,22 +261,19 @@ const char __gnat_text_translation_required = 0;
...
@@ -264,22 +261,19 @@ const char __gnat_text_translation_required = 0;
/* These functions do nothing in non-DOS systems. */
/* These functions do nothing in non-DOS systems. */
void
void
__gnat_set_binary_mode
(
handle
)
__gnat_set_binary_mode
(
int
handle
ATTRIBUTE_UNUSED
)
int
handle
ATTRIBUTE_UNUSED
;
{
{
}
}
void
void
__gnat_set_text_mode
(
handle
)
__gnat_set_text_mode
(
int
handle
ATTRIBUTE_UNUSED
)
int
handle
ATTRIBUTE_UNUSED
;
{
{
}
}
char
*
char
*
__gnat_ttyname
(
filedes
)
__gnat_ttyname
(
int
filedes
)
int
filedes
;
{
{
#ifndef __vxworks
#ifndef __vxworks
extern
char
*
ttyname
PARAMS
((
int
)
);
extern
char
*
ttyname
(
int
);
return
ttyname
(
filedes
);
return
ttyname
(
filedes
);
...
@@ -315,18 +309,14 @@ static int initted = 0;
...
@@ -315,18 +309,14 @@ static int initted = 0;
/* Implements the common processing for getc_immediate and
/* Implements the common processing for getc_immediate and
getc_immediate_nowait. */
getc_immediate_nowait. */
extern
void
getc_immediate
PARAMS
((
FILE
*
,
int
*
,
int
*
));
extern
void
getc_immediate
(
FILE
*
,
int
*
,
int
*
);
extern
void
getc_immediate_nowait
PARAMS
((
FILE
*
,
int
*
,
int
*
,
int
*
));
extern
void
getc_immediate_nowait
(
FILE
*
,
int
*
,
int
*
,
int
*
);
extern
void
getc_immediate_common
PARAMS
((
FILE
*
,
int
*
,
int
*
,
extern
void
getc_immediate_common
(
FILE
*
,
int
*
,
int
*
,
int
*
,
int
);
int
*
,
int
));
/* Called by Get_Immediate (Foo); */
/* Called by Get_Immediate (Foo); */
void
void
getc_immediate
(
stream
,
ch
,
end_of_file
)
getc_immediate
(
FILE
*
stream
,
int
*
ch
,
int
*
end_of_file
)
FILE
*
stream
;
int
*
ch
;
int
*
end_of_file
;
{
{
int
avail
;
int
avail
;
...
@@ -336,11 +326,7 @@ getc_immediate (stream, ch, end_of_file)
...
@@ -336,11 +326,7 @@ getc_immediate (stream, ch, end_of_file)
/* Called by Get_Immediate (Foo, Available); */
/* Called by Get_Immediate (Foo, Available); */
void
void
getc_immediate_nowait
(
stream
,
ch
,
end_of_file
,
avail
)
getc_immediate_nowait
(
FILE
*
stream
,
int
*
ch
,
int
*
end_of_file
,
int
*
avail
)
FILE
*
stream
;
int
*
ch
;
int
*
end_of_file
;
int
*
avail
;
{
{
getc_immediate_common
(
stream
,
ch
,
end_of_file
,
avail
,
0
);
getc_immediate_common
(
stream
,
ch
,
end_of_file
,
avail
,
0
);
}
}
...
@@ -348,12 +334,11 @@ getc_immediate_nowait (stream, ch, end_of_file, avail)
...
@@ -348,12 +334,11 @@ getc_immediate_nowait (stream, ch, end_of_file, avail)
/* Called by getc_immediate () and getc_immediate_nowait () */
/* Called by getc_immediate () and getc_immediate_nowait () */
void
void
getc_immediate_common
(
stream
,
ch
,
end_of_file
,
avail
,
waiting
)
getc_immediate_common
(
FILE
*
stream
,
FILE
*
stream
;
int
*
ch
,
int
*
ch
;
int
*
end_of_file
,
int
*
end_of_file
;
int
*
avail
,
int
*
avail
;
int
waiting
)
int
waiting
;
{
{
#if defined (linux) || defined (sun) || defined (sgi) || defined (__EMX__) \
#if defined (linux) || defined (sun) || defined (sgi) || defined (__EMX__) \
|| (defined (__osf__) && ! defined (__alpha_vxworks)) \
|| (defined (__osf__) && ! defined (__alpha_vxworks)) \
...
@@ -614,31 +599,31 @@ getc_immediate_common (stream, ch, end_of_file, avail, waiting)
...
@@ -614,31 +599,31 @@ getc_immediate_common (stream, ch, end_of_file, avail, waiting)
will want to import these). We use the same names as the routines used
will want to import these). We use the same names as the routines used
by AdaMagic for compatibility. */
by AdaMagic for compatibility. */
char
*
rts_get_hInstance
PARAMS
((
void
)
);
char
*
rts_get_hInstance
(
void
);
char
*
rts_get_hPrevInstance
PARAMS
((
void
)
);
char
*
rts_get_hPrevInstance
(
void
);
char
*
rts_get_lpCommandLine
PARAMS
((
void
)
);
char
*
rts_get_lpCommandLine
(
void
);
int
rts_get_nShowCmd
PARAMS
((
void
)
);
int
rts_get_nShowCmd
(
void
);
char
*
char
*
rts_get_hInstance
()
rts_get_hInstance
(
void
)
{
{
return
(
char
*
)
GetModuleHandleA
(
0
);
return
(
char
*
)
GetModuleHandleA
(
0
);
}
}
char
*
char
*
rts_get_hPrevInstance
()
rts_get_hPrevInstance
(
void
)
{
{
return
0
;
return
0
;
}
}
char
*
char
*
rts_get_lpCommandLine
()
rts_get_lpCommandLine
(
void
)
{
{
return
GetCommandLineA
();
return
GetCommandLineA
();
}
}
int
int
rts_get_nShowCmd
()
rts_get_nShowCmd
(
void
)
{
{
return
1
;
return
1
;
}
}
...
@@ -650,10 +635,10 @@ rts_get_nShowCmd ()
...
@@ -650,10 +635,10 @@ rts_get_nShowCmd ()
#include <time.h>
#include <time.h>
extern
long
get_gmtoff
PARAMS
((
void
)
);
extern
long
get_gmtoff
(
void
);
long
long
get_gmtoff
()
get_gmtoff
(
void
)
{
{
time_t
t
;
time_t
t
;
struct
tm
*
ts
;
struct
tm
*
ts
;
...
@@ -668,22 +653,19 @@ get_gmtoff ()
...
@@ -668,22 +653,19 @@ get_gmtoff ()
#if defined (_AIX) || defined (__EMX__)
#if defined (_AIX) || defined (__EMX__)
#define Lock_Task system__soft_links__lock_task
#define Lock_Task system__soft_links__lock_task
extern
void
(
*
Lock_Task
)
PARAMS
((
void
)
);
extern
void
(
*
Lock_Task
)
(
void
);
#define Unlock_Task system__soft_links__unlock_task
#define Unlock_Task system__soft_links__unlock_task
extern
void
(
*
Unlock_Task
)
PARAMS
((
void
)
);
extern
void
(
*
Unlock_Task
)
(
void
);
/* Provide reentrant version of localtime on Aix and OS/2. Note that AiX does
/* Provide reentrant version of localtime on Aix and OS/2. Note that AiX does
provide localtime_r, but in the library libc_r which doesn't get included
provide localtime_r, but in the library libc_r which doesn't get included
systematically, so we can't use it. */
systematically, so we can't use it. */
extern
struct
tm
*
__gnat_localtime_r
PARAMS
((
const
time_t
*
,
extern
struct
tm
*
__gnat_localtime_r
(
const
time_t
*
,
struct
tm
*
);
struct
tm
*
));
struct
tm
*
struct
tm
*
__gnat_localtime_r
(
timer
,
tp
)
__gnat_localtime_r
(
const
time_t
*
timer
,
struct
tm
*
tp
)
const
time_t
*
timer
;
struct
tm
*
tp
;
{
{
struct
tm
*
tmp
;
struct
tm
*
tmp
;
...
@@ -703,12 +685,10 @@ __gnat_localtime_r (timer, tp)
...
@@ -703,12 +685,10 @@ __gnat_localtime_r (timer, tp)
spec is required. Only use when ___THREADS_POSIX4ad4__ is defined,
spec is required. Only use when ___THREADS_POSIX4ad4__ is defined,
the Lynx convention when building against the legacy API. */
the Lynx convention when building against the legacy API. */
extern
struct
tm
*
__gnat_localtime_r
PARAMS
((
const
time_t
*
,
struct
tm
*
)
);
extern
struct
tm
*
__gnat_localtime_r
(
const
time_t
*
,
struct
tm
*
);
struct
tm
*
struct
tm
*
__gnat_localtime_r
(
timer
,
tp
)
__gnat_localtime_r
(
const
time_t
*
timer
,
struct
tm
*
tp
)
const
time_t
*
timer
;
struct
tm
*
tp
;
{
{
localtime_r
(
tp
,
timer
);
localtime_r
(
tp
,
timer
);
return
NULL
;
return
NULL
;
...
@@ -723,12 +703,10 @@ __gnat_localtime_r (timer, tp)
...
@@ -723,12 +703,10 @@ __gnat_localtime_r (timer, tp)
/* All other targets provide a standard localtime_r */
/* All other targets provide a standard localtime_r */
extern
struct
tm
*
__gnat_localtime_r
PARAMS
((
const
time_t
*
,
struct
tm
*
)
);
extern
struct
tm
*
__gnat_localtime_r
(
const
time_t
*
,
struct
tm
*
);
struct
tm
*
struct
tm
*
__gnat_localtime_r
(
timer
,
tp
)
__gnat_localtime_r
(
const
time_t
*
timer
,
struct
tm
*
tp
)
const
time_t
*
timer
;
struct
tm
*
tp
;
{
{
return
(
struct
tm
*
)
localtime_r
(
timer
,
tp
);
return
(
struct
tm
*
)
localtime_r
(
timer
,
tp
);
}
}
...
...
gcc/ada/targtyps.c
View file @
9373164a
...
@@ -69,86 +69,86 @@
...
@@ -69,86 +69,86 @@
to determine the sizes that are used for various C types. */
to determine the sizes that are used for various C types. */
Pos
Pos
get_target_bits_per_unit
()
get_target_bits_per_unit
(
void
)
{
{
return
BITS_PER_UNIT
;
return
BITS_PER_UNIT
;
}
}
Pos
Pos
get_target_bits_per_word
()
get_target_bits_per_word
(
void
)
{
{
return
BITS_PER_WORD
;
return
BITS_PER_WORD
;
}
}
Pos
Pos
get_target_char_size
()
get_target_char_size
(
void
)
{
{
return
CHAR_TYPE_SIZE
;
return
CHAR_TYPE_SIZE
;
}
}
Pos
Pos
get_target_wchar_t_size
()
get_target_wchar_t_size
(
void
)
{
{
/* We never want wide chacters less than "short" in Ada. */
/* We never want wide chacters less than "short" in Ada. */
return
MAX
(
SHORT_TYPE_SIZE
,
WCHAR_TYPE_SIZE
);
return
MAX
(
SHORT_TYPE_SIZE
,
WCHAR_TYPE_SIZE
);
}
}
Pos
Pos
get_target_short_size
()
get_target_short_size
(
void
)
{
{
return
SHORT_TYPE_SIZE
;
return
SHORT_TYPE_SIZE
;
}
}
Pos
Pos
get_target_int_size
()
get_target_int_size
(
void
)
{
{
return
INT_TYPE_SIZE
;
return
INT_TYPE_SIZE
;
}
}
Pos
Pos
get_target_long_size
()
get_target_long_size
(
void
)
{
{
return
ADA_LONG_TYPE_SIZE
;
return
ADA_LONG_TYPE_SIZE
;
}
}
Pos
Pos
get_target_long_long_size
()
get_target_long_long_size
(
void
)
{
{
return
LONG_LONG_TYPE_SIZE
;
return
LONG_LONG_TYPE_SIZE
;
}
}
Pos
Pos
get_target_float_size
()
get_target_float_size
(
void
)
{
{
return
FLOAT_TYPE_SIZE
;
return
FLOAT_TYPE_SIZE
;
}
}
Pos
Pos
get_target_double_size
()
get_target_double_size
(
void
)
{
{
return
DOUBLE_TYPE_SIZE
;
return
DOUBLE_TYPE_SIZE
;
}
}
Pos
Pos
get_target_long_double_size
()
get_target_long_double_size
(
void
)
{
{
return
WIDEST_HARDWARE_FP_SIZE
;
return
WIDEST_HARDWARE_FP_SIZE
;
}
}
Pos
Pos
get_target_pointer_size
()
get_target_pointer_size
(
void
)
{
{
return
POINTER_SIZE
;
return
POINTER_SIZE
;
}
}
Pos
Pos
get_target_maximum_alignment
()
get_target_maximum_alignment
(
void
)
{
{
return
BIGGEST_ALIGNMENT
/
BITS_PER_UNIT
;
return
BIGGEST_ALIGNMENT
/
BITS_PER_UNIT
;
}
}
Boolean
Boolean
get_target_no_dollar_in_label
()
get_target_no_dollar_in_label
(
void
)
{
{
#ifdef NO_DOLLAR_IN_LABEL
#ifdef NO_DOLLAR_IN_LABEL
return
1
;
return
1
;
...
@@ -162,31 +162,31 @@ get_target_no_dollar_in_label ()
...
@@ -162,31 +162,31 @@ get_target_no_dollar_in_label ()
#endif
#endif
Nat
Nat
get_float_words_be
()
get_float_words_be
(
void
)
{
{
return
FLOAT_WORDS_BIG_ENDIAN
;
return
FLOAT_WORDS_BIG_ENDIAN
;
}
}
Nat
Nat
get_words_be
()
get_words_be
(
void
)
{
{
return
WORDS_BIG_ENDIAN
;
return
WORDS_BIG_ENDIAN
;
}
}
Nat
Nat
get_bytes_be
()
get_bytes_be
(
void
)
{
{
return
BYTES_BIG_ENDIAN
;
return
BYTES_BIG_ENDIAN
;
}
}
Nat
Nat
get_bits_be
()
get_bits_be
(
void
)
{
{
return
BITS_BIG_ENDIAN
;
return
BITS_BIG_ENDIAN
;
}
}
Nat
Nat
get_strict_alignment
()
get_strict_alignment
(
void
)
{
{
return
STRICT_ALIGNMENT
;
return
STRICT_ALIGNMENT
;
}
}
gcc/ada/tb-alvms.c
View file @
9373164a
...
@@ -207,12 +207,11 @@ typedef struct {
...
@@ -207,12 +207,11 @@ typedef struct {
********************/
********************/
int
int
__gnat_backtrace
(
array
,
size
,
exclude_min
,
exclude_max
,
skip_frames
)
__gnat_backtrace
(
void
**
array
,
void
**
array
;
int
size
,
int
size
;
void
*
exclude_min
,
void
*
exclude_min
;
void
*
exclude_max
,
void
*
exclude_max
;
int
skip_frames
)
int
skip_frames
;
{
{
int
cnt
;
int
cnt
;
...
...
gcc/ada/tb-alvxw.c
View file @
9373164a
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
#include <limits.h>
#include <limits.h>
#include <string.h>
#include <string.h>
extern
void
kerTaskEntry
();
extern
void
kerTaskEntry
(
void
);
/* We still use a number of macros similar to the ones for the generic
/* We still use a number of macros similar to the ones for the generic
__gnat_backtrace implementation. */
__gnat_backtrace implementation. */
...
@@ -259,8 +259,7 @@ struct alloc_chain
...
@@ -259,8 +259,7 @@ struct alloc_chain
struct
alloc_chain
*
trace_alloc_chain
;
struct
alloc_chain
*
trace_alloc_chain
;
static
void
*
static
void
*
trace_alloc
(
n
)
trace_alloc
(
unsigned
int
n
)
unsigned
int
n
;
{
{
struct
alloc_chain
*
result
=
malloc
(
n
+
sizeof
(
struct
alloc_chain
));
struct
alloc_chain
*
result
=
malloc
(
n
+
sizeof
(
struct
alloc_chain
));
...
@@ -270,7 +269,7 @@ trace_alloc (n)
...
@@ -270,7 +269,7 @@ trace_alloc (n)
}
}
static
void
static
void
free_trace_alloc
()
free_trace_alloc
(
void
)
{
{
while
(
trace_alloc_chain
!=
0
)
while
(
trace_alloc_chain
!=
0
)
{
{
...
@@ -285,9 +284,7 @@ free_trace_alloc ()
...
@@ -285,9 +284,7 @@ free_trace_alloc ()
otherwise. */
otherwise. */
static
int
static
int
read_memory_safe4
(
addr
,
dest
)
read_memory_safe4
(
CORE_ADDR
addr
,
unsigned
int
*
dest
)
CORE_ADDR
addr
;
unsigned
int
*
dest
;
{
{
*
dest
=
*
((
unsigned
int
*
)
addr
);
*
dest
=
*
((
unsigned
int
*
)
addr
);
return
0
;
return
0
;
...
@@ -297,17 +294,14 @@ read_memory_safe4 (addr, dest)
...
@@ -297,17 +294,14 @@ read_memory_safe4 (addr, dest)
otherwise. */
otherwise. */
static
int
static
int
read_memory_safe8
(
addr
,
dest
)
read_memory_safe8
(
CORE_ADDR
addr
,
CORE_ADDR
*
dest
)
CORE_ADDR
addr
;
CORE_ADDR
*
dest
;
{
{
*
dest
=
*
((
CORE_ADDR
*
)
addr
);
*
dest
=
*
((
CORE_ADDR
*
)
addr
);
return
0
;
return
0
;
}
}
static
CORE_ADDR
static
CORE_ADDR
read_register
(
regno
)
read_register
(
int
regno
)
int
regno
;
{
{
if
(
regno
>=
0
&&
regno
<
31
)
if
(
regno
>=
0
&&
regno
<
31
)
return
theRegisters
[
regno
];
return
theRegisters
[
regno
];
...
@@ -316,23 +310,20 @@ read_register (regno)
...
@@ -316,23 +310,20 @@ read_register (regno)
}
}
static
void
static
void
frame_saved_regs_zalloc
(
fi
)
frame_saved_regs_zalloc
(
struct
frame_info
*
fi
)
struct
frame_info
*
fi
;
{
{
fi
->
saved_regs
=
(
CORE_ADDR
*
)
trace_alloc
(
SIZEOF_FRAME_SAVED_REGS
);
fi
->
saved_regs
=
(
CORE_ADDR
*
)
trace_alloc
(
SIZEOF_FRAME_SAVED_REGS
);
memset
(
fi
->
saved_regs
,
0
,
SIZEOF_FRAME_SAVED_REGS
);
memset
(
fi
->
saved_regs
,
0
,
SIZEOF_FRAME_SAVED_REGS
);
}
}
static
void
*
static
void
*
frame_obstack_alloc
(
size
)
frame_obstack_alloc
(
unsigned
long
size
)
unsigned
long
size
;
{
{
return
(
void
*
)
trace_alloc
(
size
);
return
(
void
*
)
trace_alloc
(
size
);
}
}
static
int
static
int
inside_entry_file
(
addr
)
inside_entry_file
(
CORE_ADDR
addr
)
CORE_ADDR
addr
;
{
{
if
(
addr
==
0
)
if
(
addr
==
0
)
return
1
;
return
1
;
...
@@ -341,8 +332,7 @@ inside_entry_file (addr)
...
@@ -341,8 +332,7 @@ inside_entry_file (addr)
}
}
static
CORE_ADDR
static
CORE_ADDR
alpha_saved_pc_after_call
(
frame
)
alpha_saved_pc_after_call
(
struct
frame_info
*
frame
)
struct
frame_info
*
frame
;
{
{
CORE_ADDR
pc
=
frame
->
pc
;
CORE_ADDR
pc
=
frame
->
pc
;
alpha_extra_func_info_t
proc_desc
;
alpha_extra_func_info_t
proc_desc
;
...
@@ -358,8 +348,7 @@ alpha_saved_pc_after_call (frame)
...
@@ -358,8 +348,7 @@ alpha_saved_pc_after_call (frame)
NULL). */
NULL). */
static
void
static
void
alpha_find_saved_regs
(
frame
)
alpha_find_saved_regs
(
struct
frame_info
*
frame
)
struct
frame_info
*
frame
;
{
{
int
ireg
;
int
ireg
;
CORE_ADDR
reg_position
;
CORE_ADDR
reg_position
;
...
@@ -430,9 +419,7 @@ alpha_find_saved_regs (frame)
...
@@ -430,9 +419,7 @@ alpha_find_saved_regs (frame)
}
}
static
CORE_ADDR
static
CORE_ADDR
read_next_frame_reg
(
fi
,
regno
)
read_next_frame_reg
(
struct
frame_info
*
fi
,
int
regno
)
struct
frame_info
*
fi
;
int
regno
;
{
{
CORE_ADDR
result
;
CORE_ADDR
result
;
for
(;
fi
;
fi
=
fi
->
next
)
for
(;
fi
;
fi
=
fi
->
next
)
...
@@ -460,8 +447,7 @@ read_next_frame_reg (fi, regno)
...
@@ -460,8 +447,7 @@ read_next_frame_reg (fi, regno)
}
}
static
CORE_ADDR
static
CORE_ADDR
alpha_frame_saved_pc
(
frame
)
alpha_frame_saved_pc
(
struct
frame_info
*
frame
)
struct
frame_info
*
frame
;
{
{
return
read_next_frame_reg
(
frame
,
frame
->
pc_reg
);
return
read_next_frame_reg
(
frame
,
frame
->
pc_reg
);
}
}
...
@@ -472,8 +458,7 @@ static struct alpha_extra_func_info temp_proc_desc;
...
@@ -472,8 +458,7 @@ static struct alpha_extra_func_info temp_proc_desc;
$zero,($ra),1" on alpha. */
$zero,($ra),1" on alpha. */
static
int
static
int
alpha_about_to_return
(
pc
)
alpha_about_to_return
(
CORE_ADDR
pc
)
CORE_ADDR
pc
;
{
{
int
inst
;
int
inst
;
...
@@ -485,8 +470,7 @@ alpha_about_to_return (pc)
...
@@ -485,8 +470,7 @@ alpha_about_to_return (pc)
containing address PC. Returns 0 if none detected. */
containing address PC. Returns 0 if none detected. */
static
CORE_ADDR
static
CORE_ADDR
heuristic_proc_start
(
pc
)
heuristic_proc_start
(
CORE_ADDR
pc
)
CORE_ADDR
pc
;
{
{
CORE_ADDR
start_pc
=
pc
;
CORE_ADDR
start_pc
=
pc
;
CORE_ADDR
fence
=
start_pc
-
heuristic_fence_post
;
CORE_ADDR
fence
=
start_pc
-
heuristic_fence_post
;
...
@@ -512,11 +496,10 @@ heuristic_proc_start (pc)
...
@@ -512,11 +496,10 @@ heuristic_proc_start (pc)
}
}
static
alpha_extra_func_info_t
static
alpha_extra_func_info_t
heuristic_proc_desc
(
start_pc
,
limit_pc
,
next_frame
,
saved_regs_p
)
heuristic_proc_desc
(
CORE_ADDR
start_pc
,
CORE_ADDR
start_pc
;
CORE_ADDR
limit_pc
,
CORE_ADDR
limit_pc
;
struct
frame_info
*
next_frame
,
struct
frame_info
*
next_frame
;
struct
frame_saved_regs
*
saved_regs_p
)
struct
frame_saved_regs
*
saved_regs_p
;
{
{
CORE_ADDR
sp
=
read_next_frame_reg
(
next_frame
,
SP_REGNUM
);
CORE_ADDR
sp
=
read_next_frame_reg
(
next_frame
,
SP_REGNUM
);
CORE_ADDR
cur_pc
;
CORE_ADDR
cur_pc
;
...
@@ -641,10 +624,9 @@ heuristic_proc_desc (start_pc, limit_pc, next_frame, saved_regs_p)
...
@@ -641,10 +624,9 @@ heuristic_proc_desc (start_pc, limit_pc, next_frame, saved_regs_p)
}
}
static
alpha_extra_func_info_t
static
alpha_extra_func_info_t
find_proc_desc
(
pc
,
next_frame
,
saved_regs
)
find_proc_desc
(
CORE_ADDR
pc
,
CORE_ADDR
pc
;
struct
frame_info
*
next_frame
,
struct
frame_info
*
next_frame
;
struct
frame_saved_regs
*
saved_regs
)
struct
frame_saved_regs
*
saved_regs
;
{
{
CORE_ADDR
startaddr
;
CORE_ADDR
startaddr
;
...
@@ -660,8 +642,7 @@ find_proc_desc (pc, next_frame, saved_regs)
...
@@ -660,8 +642,7 @@ find_proc_desc (pc, next_frame, saved_regs)
}
}
static
CORE_ADDR
static
CORE_ADDR
alpha_frame_chain
(
frame
)
alpha_frame_chain
(
struct
frame_info
*
frame
)
struct
frame_info
*
frame
;
{
{
alpha_extra_func_info_t
proc_desc
;
alpha_extra_func_info_t
proc_desc
;
CORE_ADDR
saved_pc
=
FRAME_SAVED_PC
(
frame
);
CORE_ADDR
saved_pc
=
FRAME_SAVED_PC
(
frame
);
...
@@ -685,8 +666,7 @@ alpha_frame_chain (frame)
...
@@ -685,8 +666,7 @@ alpha_frame_chain (frame)
}
}
static
void
static
void
init_extra_frame_info
(
frame
)
init_extra_frame_info
(
struct
frame_info
*
frame
)
struct
frame_info
*
frame
;
{
{
struct
frame_saved_regs
temp_saved_regs
;
struct
frame_saved_regs
temp_saved_regs
;
alpha_extra_func_info_t
proc_desc
=
alpha_extra_func_info_t
proc_desc
=
...
@@ -729,9 +709,7 @@ init_extra_frame_info (frame)
...
@@ -729,9 +709,7 @@ init_extra_frame_info (frame)
Always returns a non-NULL value. */
Always returns a non-NULL value. */
static
struct
frame_info
*
static
struct
frame_info
*
create_new_frame
(
addr
,
pc
)
create_new_frame
(
CORE_ADDR
addr
,
CORE_ADDR
pc
)
CORE_ADDR
addr
;
CORE_ADDR
pc
;
{
{
struct
frame_info
*
fi
;
struct
frame_info
*
fi
;
...
@@ -754,19 +732,19 @@ create_new_frame (addr, pc)
...
@@ -754,19 +732,19 @@ create_new_frame (addr, pc)
static
CORE_ADDR
current_pc
;
static
CORE_ADDR
current_pc
;
static
void
static
void
set_current_pc
()
set_current_pc
(
void
)
{
{
current_pc
=
(
CORE_ADDR
)
__builtin_return_address
(
0
);
current_pc
=
(
CORE_ADDR
)
__builtin_return_address
(
0
);
}
}
static
CORE_ADDR
static
CORE_ADDR
read_pc
()
read_pc
(
void
)
{
{
return
current_pc
;
return
current_pc
;
}
}
static
struct
frame_info
*
static
struct
frame_info
*
get_current_frame
()
get_current_frame
(
void
)
{
{
return
create_new_frame
(
0
,
read_pc
());
return
create_new_frame
(
0
,
read_pc
());
}
}
...
@@ -775,8 +753,7 @@ get_current_frame ()
...
@@ -775,8 +753,7 @@ get_current_frame ()
If FI is the original frame (it has no caller), return 0. */
If FI is the original frame (it has no caller), return 0. */
static
struct
frame_info
*
static
struct
frame_info
*
get_prev_frame
(
next_frame
)
get_prev_frame
(
struct
frame_info
*
next_frame
)
struct
frame_info
*
next_frame
;
{
{
CORE_ADDR
address
=
0
;
CORE_ADDR
address
=
0
;
struct
frame_info
*
prev
;
struct
frame_info
*
prev
;
...
@@ -897,12 +874,11 @@ get_prev_frame (next_frame)
...
@@ -897,12 +874,11 @@ get_prev_frame (next_frame)
"stq $" #regno ", " #disp "(%0)\n"
"stq $" #regno ", " #disp "(%0)\n"
int
int
__gnat_backtrace
(
array
,
size
,
exclude_min
,
exclude_max
,
skip_frames
)
__gnat_backtrace
(
void
**
array
,
void
**
array
;
int
size
,
int
size
;
void
*
exclude_min
,
void
*
exclude_min
;
void
*
exclude_max
,
void
*
exclude_max
;
int
skip_frames
)
int
skip_frames
;
{
{
struct
frame_info
*
top
;
struct
frame_info
*
top
;
struct
frame_info
*
current
;
struct
frame_info
*
current
;
...
...
gcc/ada/tracebak.c
View file @
9373164a
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
#include "system.h"
#include "system.h"
#endif
#endif
extern
int
__gnat_backtrace
PARAMS
((
void
**
,
int
,
void
*
,
void
*
,
int
)
);
extern
int
__gnat_backtrace
(
void
**
,
int
,
void
*
,
void
*
,
int
);
/* The point is to provide an implementation of the __gnat_bactrace function
/* The point is to provide an implementation of the __gnat_bactrace function
above, called by the default implementation of the System.Traceback
above, called by the default implementation of the System.Traceback
...
@@ -77,10 +77,10 @@ extern int __gnat_backtrace PARAMS ((void **, int, void *, void *, int));
...
@@ -77,10 +77,10 @@ extern int __gnat_backtrace PARAMS ((void **, int, void *, void *, int));
function is still referenced by the default System.Traceback. */
function is still referenced by the default System.Traceback. */
#define Lock_Task system__soft_links__lock_task
#define Lock_Task system__soft_links__lock_task
extern
void
(
*
Lock_Task
)
PARAMS
((
void
)
);
extern
void
(
*
Lock_Task
)
(
void
);
#define Unlock_Task system__soft_links__unlock_task
#define Unlock_Task system__soft_links__unlock_task
extern
void
(
*
Unlock_Task
)
PARAMS
((
void
)
);
extern
void
(
*
Unlock_Task
)
(
void
);
/*-------------------------------------*
/*-------------------------------------*
*-- Target specific implementations --*
*-- Target specific implementations --*
...
@@ -339,12 +339,11 @@ static void forced_callee () {}
...
@@ -339,12 +339,11 @@ static void forced_callee () {}
#endif
#endif
int
int
__gnat_backtrace
(
array
,
size
,
exclude_min
,
exclude_max
,
skip_frames
)
__gnat_backtrace
(
void
**
array
,
void
**
array
;
int
size
,
int
size
;
void
*
exclude_min
,
void
*
exclude_min
;
void
*
exclude_max
,
void
*
exclude_max
;
int
skip_frames
)
int
skip_frames
;
{
{
struct
layout
*
current
;
struct
layout
*
current
;
void
*
top_frame
;
void
*
top_frame
;
...
...
gcc/ada/trans.c
View file @
9373164a
...
@@ -103,24 +103,22 @@ Node_Id error_gnat_node;
...
@@ -103,24 +103,22 @@ Node_Id error_gnat_node;
a return in some functions. See processing for N_Subprogram_Body. */
a return in some functions. See processing for N_Subprogram_Body. */
static
GTY
(())
tree
gnu_return_label_stack
;
static
GTY
(())
tree
gnu_return_label_stack
;
static
tree
tree_transform
PARAMS
((
Node_Id
));
static
tree
tree_transform
(
Node_Id
);
static
void
elaborate_all_entities
PARAMS
((
Node_Id
));
static
void
elaborate_all_entities
(
Node_Id
);
static
void
process_freeze_entity
PARAMS
((
Node_Id
));
static
void
process_freeze_entity
(
Node_Id
);
static
void
process_inlined_subprograms
PARAMS
((
Node_Id
));
static
void
process_inlined_subprograms
(
Node_Id
);
static
void
process_decls
PARAMS
((
List_Id
,
List_Id
,
Node_Id
,
static
void
process_decls
(
List_Id
,
List_Id
,
Node_Id
,
int
,
int
);
int
,
int
));
static
tree
emit_range_check
(
tree
,
Node_Id
);
static
tree
emit_range_check
PARAMS
((
tree
,
Node_Id
));
static
tree
emit_index_check
(
tree
,
tree
,
tree
,
tree
);
static
tree
emit_index_check
PARAMS
((
tree
,
tree
,
tree
,
tree
));
static
tree
emit_check
(
tree
,
tree
,
int
);
static
tree
emit_check
PARAMS
((
tree
,
tree
,
int
));
static
tree
convert_with_check
(
Entity_Id
,
tree
,
int
,
int
,
int
);
static
tree
convert_with_check
PARAMS
((
Entity_Id
,
tree
,
static
int
addressable_p
(
tree
);
int
,
int
,
int
));
static
tree
assoc_to_constructor
(
Node_Id
,
tree
);
static
int
addressable_p
PARAMS
((
tree
));
static
tree
extract_values
(
tree
,
tree
);
static
tree
assoc_to_constructor
PARAMS
((
Node_Id
,
tree
));
static
tree
pos_to_constructor
(
Node_Id
,
tree
,
Entity_Id
);
static
tree
extract_values
PARAMS
((
tree
,
tree
));
static
tree
maybe_implicit_deref
(
tree
);
static
tree
pos_to_constructor
PARAMS
((
Node_Id
,
tree
,
Entity_Id
));
static
tree
gnat_stabilize_reference_1
(
tree
,
int
);
static
tree
maybe_implicit_deref
PARAMS
((
tree
));
static
int
build_unit_elab
(
Entity_Id
,
int
,
tree
);
static
tree
gnat_stabilize_reference_1
PARAMS
((
tree
,
int
));
static
int
build_unit_elab
PARAMS
((
Entity_Id
,
int
,
tree
));
/* Constants for +0.5 and -0.5 for float-to-integer rounding. */
/* Constants for +0.5 and -0.5 for float-to-integer rounding. */
static
REAL_VALUE_TYPE
dconstp5
;
static
REAL_VALUE_TYPE
dconstp5
;
...
@@ -130,27 +128,23 @@ static REAL_VALUE_TYPE dconstmp5;
...
@@ -130,27 +128,23 @@ static REAL_VALUE_TYPE dconstmp5;
structures and then generates code. */
structures and then generates code. */
void
void
gigi
(
gnat_root
,
max_gnat_node
,
number_name
,
nodes_ptr
,
next_node_ptr
,
gigi
(
Node_Id
gnat_root
,
prev_node_ptr
,
elists_ptr
,
elmts_ptr
,
strings_ptr
,
string_chars_ptr
,
int
max_gnat_node
,
list_headers_ptr
,
number_units
,
file_info_ptr
,
standard_integer
,
int
number_name
,
standard_long_long_float
,
standard_exception_type
,
gigi_operating_mode
)
struct
Node
*
nodes_ptr
,
Node_Id
gnat_root
;
Node_Id
*
next_node_ptr
,
int
max_gnat_node
;
Node_Id
*
prev_node_ptr
,
int
number_name
;
struct
Elist_Header
*
elists_ptr
,
struct
Node
*
nodes_ptr
;
struct
Elmt_Item
*
elmts_ptr
,
Node_Id
*
next_node_ptr
;
struct
String_Entry
*
strings_ptr
,
Node_Id
*
prev_node_ptr
;
Char_Code
*
string_chars_ptr
,
struct
Elist_Header
*
elists_ptr
;
struct
List_Header
*
list_headers_ptr
,
struct
Elmt_Item
*
elmts_ptr
;
Int
number_units
ATTRIBUTE_UNUSED
,
struct
String_Entry
*
strings_ptr
;
char
*
file_info_ptr
ATTRIBUTE_UNUSED
,
Char_Code
*
string_chars_ptr
;
Entity_Id
standard_integer
,
struct
List_Header
*
list_headers_ptr
;
Entity_Id
standard_long_long_float
,
Int
number_units
ATTRIBUTE_UNUSED
;
Entity_Id
standard_exception_type
,
char
*
file_info_ptr
ATTRIBUTE_UNUSED
;
Int
gigi_operating_mode
)
Entity_Id
standard_integer
;
Entity_Id
standard_long_long_float
;
Entity_Id
standard_exception_type
;
Int
gigi_operating_mode
;
{
{
tree
gnu_standard_long_long_float
;
tree
gnu_standard_long_long_float
;
tree
gnu_standard_exception_type
;
tree
gnu_standard_exception_type
;
...
@@ -233,8 +227,7 @@ gigi (gnat_root, max_gnat_node, number_name, nodes_ptr, next_node_ptr,
...
@@ -233,8 +227,7 @@ gigi (gnat_root, max_gnat_node, number_name, nodes_ptr, next_node_ptr,
part of the tree. */
part of the tree. */
void
void
gnat_to_code
(
gnat_node
)
gnat_to_code
(
Node_Id
gnat_node
)
Node_Id
gnat_node
;
{
{
tree
gnu_root
;
tree
gnu_root
;
...
@@ -259,8 +252,7 @@ gnat_to_code (gnat_node)
...
@@ -259,8 +252,7 @@ gnat_to_code (gnat_node)
code. */
code. */
tree
tree
gnat_to_gnu
(
gnat_node
)
gnat_to_gnu
(
Node_Id
gnat_node
)
Node_Id
gnat_node
;
{
{
tree
gnu_root
;
tree
gnu_root
;
...
@@ -286,8 +278,7 @@ gnat_to_gnu (gnat_node)
...
@@ -286,8 +278,7 @@ gnat_to_gnu (gnat_node)
in the above two routines for most purposes. */
in the above two routines for most purposes. */
static
tree
static
tree
tree_transform
(
gnat_node
)
tree_transform
(
Node_Id
gnat_node
)
Node_Id
gnat_node
;
{
{
tree
gnu_result
=
error_mark_node
;
/* Default to no value. */
tree
gnu_result
=
error_mark_node
;
/* Default to no value. */
tree
gnu_result_type
=
void_type_node
;
tree
gnu_result_type
=
void_type_node
;
...
@@ -4156,8 +4147,7 @@ tree_transform (gnat_node)
...
@@ -4156,8 +4147,7 @@ tree_transform (gnat_node)
/* GNU_STMT is a statement. We generate code for that statement. */
/* GNU_STMT is a statement. We generate code for that statement. */
void
void
gnat_expand_stmt
(
gnu_stmt
)
gnat_expand_stmt
(
tree
gnu_stmt
)
tree
gnu_stmt
;
{
{
set_lineno_from_sloc
(
TREE_SLOC
(
gnu_stmt
),
1
);
set_lineno_from_sloc
(
TREE_SLOC
(
gnu_stmt
),
1
);
...
@@ -4193,8 +4183,7 @@ gnat_expand_stmt (gnu_stmt)
...
@@ -4193,8 +4183,7 @@ gnat_expand_stmt (gnu_stmt)
information for types in withed units, for ASIS use */
information for types in withed units, for ASIS use */
static
void
static
void
elaborate_all_entities
(
gnat_node
)
elaborate_all_entities
(
Node_Id
gnat_node
)
Node_Id
gnat_node
;
{
{
Entity_Id
gnat_with_clause
,
gnat_entity
;
Entity_Id
gnat_with_clause
,
gnat_entity
;
...
@@ -4260,8 +4249,7 @@ elaborate_all_entities (gnat_node)
...
@@ -4260,8 +4249,7 @@ elaborate_all_entities (gnat_node)
/* Do the processing of N_Freeze_Entity, GNAT_NODE. */
/* Do the processing of N_Freeze_Entity, GNAT_NODE. */
static
void
static
void
process_freeze_entity
(
gnat_node
)
process_freeze_entity
(
Node_Id
gnat_node
)
Node_Id
gnat_node
;
{
{
Entity_Id
gnat_entity
=
Entity
(
gnat_node
);
Entity_Id
gnat_entity
=
Entity
(
gnat_node
);
tree
gnu_old
;
tree
gnu_old
;
...
@@ -4369,8 +4357,7 @@ process_freeze_entity (gnat_node)
...
@@ -4369,8 +4357,7 @@ process_freeze_entity (gnat_node)
N_Compilation_Unit. */
N_Compilation_Unit. */
static
void
static
void
process_inlined_subprograms
(
gnat_node
)
process_inlined_subprograms
(
Node_Id
gnat_node
)
Node_Id
gnat_node
;
{
{
Entity_Id
gnat_entity
;
Entity_Id
gnat_entity
;
Node_Id
gnat_body
;
Node_Id
gnat_body
;
...
@@ -4416,10 +4403,11 @@ process_inlined_subprograms (gnat_node)
...
@@ -4416,10 +4403,11 @@ process_inlined_subprograms (gnat_node)
correspond to the public and private parts of a package. */
correspond to the public and private parts of a package. */
static
void
static
void
process_decls
(
gnat_decls
,
gnat_decls2
,
gnat_end_list
,
pass1p
,
pass2p
)
process_decls
(
List_Id
gnat_decls
,
List_Id
gnat_decls
,
gnat_decls2
;
List_Id
gnat_decls2
,
Node_Id
gnat_end_list
;
Node_Id
gnat_end_list
,
int
pass1p
,
pass2p
;
int
pass1p
,
int
pass2p
)
{
{
List_Id
gnat_decl_array
[
2
];
List_Id
gnat_decl_array
[
2
];
Node_Id
gnat_decl
;
Node_Id
gnat_decl
;
...
@@ -4536,9 +4524,7 @@ process_decls (gnat_decls, gnat_decls2, gnat_end_list, pass1p, pass2p)
...
@@ -4536,9 +4524,7 @@ process_decls (gnat_decls, gnat_decls2, gnat_end_list, pass1p, pass2p)
which we have to check. */
which we have to check. */
static
tree
static
tree
emit_range_check
(
gnu_expr
,
gnat_range_type
)
emit_range_check
(
tree
gnu_expr
,
Entity_Id
gnat_range_type
)
tree
gnu_expr
;
Entity_Id
gnat_range_type
;
{
{
tree
gnu_range_type
=
get_unpadded_type
(
gnat_range_type
);
tree
gnu_range_type
=
get_unpadded_type
(
gnat_range_type
);
tree
gnu_low
=
TYPE_MIN_VALUE
(
gnu_range_type
);
tree
gnu_low
=
TYPE_MIN_VALUE
(
gnu_range_type
);
...
@@ -4588,11 +4574,10 @@ emit_range_check (gnu_expr, gnat_range_type)
...
@@ -4588,11 +4574,10 @@ emit_range_check (gnu_expr, gnat_range_type)
subprograms having unconstrained array formal parameters */
subprograms having unconstrained array formal parameters */
static
tree
static
tree
emit_index_check
(
gnu_array_object
,
gnu_expr
,
gnu_low
,
gnu_high
)
emit_index_check
(
tree
gnu_array_object
,
tree
gnu_array_object
;
tree
gnu_expr
,
tree
gnu_expr
;
tree
gnu_low
,
tree
gnu_low
;
tree
gnu_high
)
tree
gnu_high
;
{
{
tree
gnu_expr_check
;
tree
gnu_expr_check
;
...
@@ -4635,10 +4620,7 @@ emit_index_check (gnu_array_object, gnu_expr, gnu_low, gnu_high)
...
@@ -4635,10 +4620,7 @@ emit_index_check (gnu_array_object, gnu_expr, gnu_low, gnu_high)
why the exception was raised. */
why the exception was raised. */
static
tree
static
tree
emit_check
(
gnu_cond
,
gnu_expr
,
reason
)
emit_check
(
tree
gnu_cond
,
tree
gnu_expr
,
int
reason
)
tree
gnu_cond
;
tree
gnu_expr
;
int
reason
;
{
{
tree
gnu_call
;
tree
gnu_call
;
tree
gnu_result
;
tree
gnu_result
;
...
@@ -4676,12 +4658,11 @@ emit_check (gnu_cond, gnu_expr, reason)
...
@@ -4676,12 +4658,11 @@ emit_check (gnu_cond, gnu_expr, reason)
truncation; otherwise round. */
truncation; otherwise round. */
static
tree
static
tree
convert_with_check
(
gnat_type
,
gnu_expr
,
overflow_p
,
range_p
,
truncate_p
)
convert_with_check
(
Entity_Id
gnat_type
,
Entity_Id
gnat_type
;
tree
gnu_expr
,
tree
gnu_expr
;
int
overflow_p
,
int
overflow_p
;
int
range_p
,
int
range_p
;
int
truncate_p
)
int
truncate_p
;
{
{
tree
gnu_type
=
get_unpadded_type
(
gnat_type
);
tree
gnu_type
=
get_unpadded_type
(
gnat_type
);
tree
gnu_in_type
=
TREE_TYPE
(
gnu_expr
);
tree
gnu_in_type
=
TREE_TYPE
(
gnu_expr
);
...
@@ -4820,8 +4801,7 @@ convert_with_check (gnat_type, gnu_expr, overflow_p, range_p, truncate_p)
...
@@ -4820,8 +4801,7 @@ convert_with_check (gnat_type, gnu_expr, overflow_p, range_p, truncate_p)
cases. */
cases. */
static
int
static
int
addressable_p
(
gnu_expr
)
addressable_p
(
tree
gnu_expr
)
tree
gnu_expr
;
{
{
switch
(
TREE_CODE
(
gnu_expr
))
switch
(
TREE_CODE
(
gnu_expr
))
{
{
...
@@ -4883,8 +4863,7 @@ addressable_p (gnu_expr)
...
@@ -4883,8 +4863,7 @@ addressable_p (gnu_expr)
make a GCC type for GNAT_ENTITY and set up the correspondance. */
make a GCC type for GNAT_ENTITY and set up the correspondance. */
void
void
process_type
(
gnat_entity
)
process_type
(
Entity_Id
gnat_entity
)
Entity_Id
gnat_entity
;
{
{
tree
gnu_old
tree
gnu_old
=
present_gnu_tree
(
gnat_entity
)
?
get_gnu_tree
(
gnat_entity
)
:
0
;
=
present_gnu_tree
(
gnat_entity
)
?
get_gnu_tree
(
gnat_entity
)
:
0
;
...
@@ -4979,9 +4958,7 @@ process_type (gnat_entity)
...
@@ -4979,9 +4958,7 @@ process_type (gnat_entity)
Return a CONSTRUCTOR to build the record. */
Return a CONSTRUCTOR to build the record. */
static
tree
static
tree
assoc_to_constructor
(
gnat_assoc
,
gnu_type
)
assoc_to_constructor
(
Node_Id
gnat_assoc
,
tree
gnu_type
)
Node_Id
gnat_assoc
;
tree
gnu_type
;
{
{
tree
gnu_field
,
gnu_list
,
gnu_result
;
tree
gnu_field
,
gnu_list
,
gnu_result
;
...
@@ -5030,10 +5007,9 @@ assoc_to_constructor (gnat_assoc, gnu_type)
...
@@ -5030,10 +5007,9 @@ assoc_to_constructor (gnat_assoc, gnu_type)
of the array component. It is needed for range checking. */
of the array component. It is needed for range checking. */
static
tree
static
tree
pos_to_constructor
(
gnat_expr
,
gnu_array_type
,
gnat_component_type
)
pos_to_constructor
(
Node_Id
gnat_expr
,
Node_Id
gnat_expr
;
tree
gnu_array_type
,
tree
gnu_array_type
;
Entity_Id
gnat_component_type
)
Entity_Id
gnat_component_type
;
{
{
tree
gnu_expr
;
tree
gnu_expr
;
tree
gnu_expr_list
=
NULL_TREE
;
tree
gnu_expr_list
=
NULL_TREE
;
...
@@ -5074,9 +5050,7 @@ pos_to_constructor (gnat_expr, gnu_array_type, gnat_component_type)
...
@@ -5074,9 +5050,7 @@ pos_to_constructor (gnat_expr, gnu_array_type, gnat_component_type)
record, make a recursive call to fill it in as well. */
record, make a recursive call to fill it in as well. */
static
tree
static
tree
extract_values
(
values
,
record_type
)
extract_values
(
tree
values
,
tree
record_type
)
tree
values
;
tree
record_type
;
{
{
tree
result
=
NULL_TREE
;
tree
result
=
NULL_TREE
;
tree
field
,
tem
;
tree
field
,
tem
;
...
@@ -5123,8 +5097,7 @@ extract_values (values, record_type)
...
@@ -5123,8 +5097,7 @@ extract_values (values, record_type)
an access object and perform the required dereferences. */
an access object and perform the required dereferences. */
static
tree
static
tree
maybe_implicit_deref
(
exp
)
maybe_implicit_deref
(
tree
exp
)
tree
exp
;
{
{
/* If the type is a pointer, dereference it. */
/* If the type is a pointer, dereference it. */
...
@@ -5142,8 +5115,7 @@ maybe_implicit_deref (exp)
...
@@ -5142,8 +5115,7 @@ maybe_implicit_deref (exp)
/* Protect EXP from multiple evaluation. This may make a SAVE_EXPR. */
/* Protect EXP from multiple evaluation. This may make a SAVE_EXPR. */
tree
tree
protect_multiple_eval
(
exp
)
protect_multiple_eval
(
tree
exp
)
tree
exp
;
{
{
tree
type
=
TREE_TYPE
(
exp
);
tree
type
=
TREE_TYPE
(
exp
);
...
@@ -5182,9 +5154,7 @@ protect_multiple_eval (exp)
...
@@ -5182,9 +5154,7 @@ protect_multiple_eval (exp)
whether to force evaluation of everything. */
whether to force evaluation of everything. */
tree
tree
gnat_stabilize_reference
(
ref
,
force
)
gnat_stabilize_reference
(
tree
ref
,
int
force
)
tree
ref
;
int
force
;
{
{
register
tree
type
=
TREE_TYPE
(
ref
);
register
tree
type
=
TREE_TYPE
(
ref
);
register
enum
tree_code
code
=
TREE_CODE
(
ref
);
register
enum
tree_code
code
=
TREE_CODE
(
ref
);
...
@@ -5280,9 +5250,7 @@ gnat_stabilize_reference (ref, force)
...
@@ -5280,9 +5250,7 @@ gnat_stabilize_reference (ref, force)
arg to force a SAVE_EXPR for everything. */
arg to force a SAVE_EXPR for everything. */
static
tree
static
tree
gnat_stabilize_reference_1
(
e
,
force
)
gnat_stabilize_reference_1
(
tree
e
,
int
force
)
tree
e
;
int
force
;
{
{
register
enum
tree_code
code
=
TREE_CODE
(
e
);
register
enum
tree_code
code
=
TREE_CODE
(
e
);
register
tree
type
=
TREE_TYPE
(
e
);
register
tree
type
=
TREE_TYPE
(
e
);
...
@@ -5345,10 +5313,7 @@ gnat_stabilize_reference_1 (e, force)
...
@@ -5345,10 +5313,7 @@ gnat_stabilize_reference_1 (e, force)
Return 1 if we didn't need an elaboration function, zero otherwise. */
Return 1 if we didn't need an elaboration function, zero otherwise. */
static
int
static
int
build_unit_elab
(
gnat_unit
,
body_p
,
gnu_elab_list
)
build_unit_elab
(
Entity_Id
gnat_unit
,
int
body_p
,
tree
gnu_elab_list
)
Entity_Id
gnat_unit
;
int
body_p
;
tree
gnu_elab_list
;
{
{
tree
gnu_decl
;
tree
gnu_decl
;
rtx
insn
;
rtx
insn
;
...
@@ -5429,16 +5394,14 @@ build_unit_elab (gnat_unit, body_p, gnu_elab_list)
...
@@ -5429,16 +5394,14 @@ build_unit_elab (gnat_unit, body_p, gnu_elab_list)
return
result
;
return
result
;
}
}
extern
char
*
__gnat_to_canonical_file_spec
PARAMS
((
char
*
)
);
extern
char
*
__gnat_to_canonical_file_spec
(
char
*
);
/* Determine the input_filename and the input_line from the source location
/* Determine the input_filename and the input_line from the source location
(Sloc) of GNAT_NODE node. Set the global variable input_filename and
(Sloc) of GNAT_NODE node. Set the global variable input_filename and
input_line. If WRITE_NOTE_P is true, emit a line number note. */
input_line. If WRITE_NOTE_P is true, emit a line number note. */
void
void
set_lineno
(
gnat_node
,
write_note_p
)
set_lineno
(
Node_Id
gnat_node
,
int
write_note_p
)
Node_Id
gnat_node
;
int
write_note_p
;
{
{
Source_Ptr
source_location
=
Sloc
(
gnat_node
);
Source_Ptr
source_location
=
Sloc
(
gnat_node
);
...
@@ -5448,9 +5411,7 @@ set_lineno (gnat_node, write_note_p)
...
@@ -5448,9 +5411,7 @@ set_lineno (gnat_node, write_note_p)
/* Likewise, but passed a Sloc. */
/* Likewise, but passed a Sloc. */
void
void
set_lineno_from_sloc
(
source_location
,
write_note_p
)
set_lineno_from_sloc
(
Source_Ptr
source_location
,
int
write_note_p
)
Source_Ptr
source_location
;
int
write_note_p
;
{
{
/* If node not from source code, ignore. */
/* If node not from source code, ignore. */
if
(
source_location
<
0
)
if
(
source_location
<
0
)
...
@@ -5486,9 +5447,7 @@ set_lineno_from_sloc (source_location, write_note_p)
...
@@ -5486,9 +5447,7 @@ set_lineno_from_sloc (source_location, write_note_p)
"&" substitution. */
"&" substitution. */
void
void
post_error
(
msg
,
node
)
post_error
(
const
char
*
msg
,
Node_Id
node
)
const
char
*
msg
;
Node_Id
node
;
{
{
String_Template
temp
;
String_Template
temp
;
Fat_Pointer
fp
;
Fat_Pointer
fp
;
...
@@ -5503,10 +5462,7 @@ post_error (msg, node)
...
@@ -5503,10 +5462,7 @@ post_error (msg, node)
is the node to use for the "&" substitution. */
is the node to use for the "&" substitution. */
void
void
post_error_ne
(
msg
,
node
,
ent
)
post_error_ne
(
const
char
*
msg
,
Node_Id
node
,
Entity_Id
ent
)
const
char
*
msg
;
Node_Id
node
;
Entity_Id
ent
;
{
{
String_Template
temp
;
String_Template
temp
;
Fat_Pointer
fp
;
Fat_Pointer
fp
;
...
@@ -5521,11 +5477,7 @@ post_error_ne (msg, node, ent)
...
@@ -5521,11 +5477,7 @@ post_error_ne (msg, node, ent)
to use for the "&" substitution, and N is the number to use for the ^. */
to use for the "&" substitution, and N is the number to use for the ^. */
void
void
post_error_ne_num
(
msg
,
node
,
ent
,
n
)
post_error_ne_num
(
const
char
*
msg
,
Node_Id
node
,
Entity_Id
ent
,
int
n
)
const
char
*
msg
;
Node_Id
node
;
Entity_Id
ent
;
int
n
;
{
{
String_Template
temp
;
String_Template
temp
;
Fat_Pointer
fp
;
Fat_Pointer
fp
;
...
@@ -5545,11 +5497,7 @@ post_error_ne_num (msg, node, ent, n)
...
@@ -5545,11 +5497,7 @@ post_error_ne_num (msg, node, ent, n)
and the text inside square brackets will be output instead. */
and the text inside square brackets will be output instead. */
void
void
post_error_ne_tree
(
msg
,
node
,
ent
,
t
)
post_error_ne_tree
(
const
char
*
msg
,
Node_Id
node
,
Entity_Id
ent
,
tree
t
)
const
char
*
msg
;
Node_Id
node
;
Entity_Id
ent
;
tree
t
;
{
{
char
*
newmsg
=
alloca
(
strlen
(
msg
)
+
1
);
char
*
newmsg
=
alloca
(
strlen
(
msg
)
+
1
);
String_Template
temp
=
{
1
,
0
};
String_Template
temp
=
{
1
,
0
};
...
@@ -5597,12 +5545,11 @@ post_error_ne_tree (msg, node, ent, t)
...
@@ -5597,12 +5545,11 @@ post_error_ne_tree (msg, node, ent, t)
integer to write in the message. */
integer to write in the message. */
void
void
post_error_ne_tree_2
(
msg
,
node
,
ent
,
t
,
num
)
post_error_ne_tree_2
(
const
char
*
msg
,
const
char
*
msg
;
Node_Id
node
,
Node_Id
node
;
Entity_Id
ent
,
Entity_Id
ent
;
tree
t
,
tree
t
;
int
num
)
int
num
;
{
{
Error_Msg_Uint_2
=
UI_From_Int
(
num
);
Error_Msg_Uint_2
=
UI_From_Int
(
num
);
post_error_ne_tree
(
msg
,
node
,
ent
,
t
);
post_error_ne_tree
(
msg
,
node
,
ent
,
t
);
...
@@ -5611,8 +5558,7 @@ post_error_ne_tree_2 (msg, node, ent, t, num)
...
@@ -5611,8 +5558,7 @@ post_error_ne_tree_2 (msg, node, ent, t, num)
/* Set the node for a second '&' in the error message. */
/* Set the node for a second '&' in the error message. */
void
void
set_second_error_entity
(
e
)
set_second_error_entity
(
Entity_Id
e
)
Entity_Id
e
;
{
{
Error_Msg_Node_2
=
e
;
Error_Msg_Node_2
=
e
;
}
}
...
@@ -5621,8 +5567,7 @@ set_second_error_entity (e)
...
@@ -5621,8 +5567,7 @@ set_second_error_entity (e)
as the relevant node that provides the location info for the error */
as the relevant node that provides the location info for the error */
void
void
gigi_abort
(
code
)
gigi_abort
(
int
code
)
int
code
;
{
{
String_Template
temp
=
{
1
,
10
};
String_Template
temp
=
{
1
,
10
};
Fat_Pointer
fp
;
Fat_Pointer
fp
;
...
@@ -5637,7 +5582,7 @@ gigi_abort (code)
...
@@ -5637,7 +5582,7 @@ gigi_abort (code)
binary and unary operations. */
binary and unary operations. */
void
void
init_code_table
()
init_code_table
(
void
)
{
{
gnu_codes
[
N_And_Then
]
=
TRUTH_ANDIF_EXPR
;
gnu_codes
[
N_And_Then
]
=
TRUTH_ANDIF_EXPR
;
gnu_codes
[
N_Or_Else
]
=
TRUTH_ORIF_EXPR
;
gnu_codes
[
N_Or_Else
]
=
TRUTH_ORIF_EXPR
;
...
...
gcc/ada/utils.c
View file @
9373164a
...
@@ -144,22 +144,21 @@ struct language_function GTY(())
...
@@ -144,22 +144,21 @@ struct language_function GTY(())
int
unused
;
int
unused
;
};
};
static
tree
merge_sizes
PARAMS
((
tree
,
tree
,
tree
,
int
,
int
));
static
tree
merge_sizes
(
tree
,
tree
,
tree
,
int
,
int
);
static
tree
compute_related_constant
PARAMS
((
tree
,
tree
));
static
tree
compute_related_constant
(
tree
,
tree
);
static
tree
split_plus
PARAMS
((
tree
,
tree
*
));
static
tree
split_plus
(
tree
,
tree
*
);
static
int
value_zerop
PARAMS
((
tree
));
static
int
value_zerop
(
tree
);
static
tree
float_type_for_size
PARAMS
((
int
,
enum
machine_mode
));
static
tree
float_type_for_size
(
int
,
enum
machine_mode
);
static
tree
convert_to_fat_pointer
PARAMS
((
tree
,
tree
));
static
tree
convert_to_fat_pointer
(
tree
,
tree
);
static
tree
convert_to_thin_pointer
PARAMS
((
tree
,
tree
));
static
tree
convert_to_thin_pointer
(
tree
,
tree
);
static
tree
make_descriptor_field
PARAMS
((
const
char
*
,
tree
,
tree
,
static
tree
make_descriptor_field
(
const
char
*
,
tree
,
tree
,
tree
);
tree
));
static
int
value_factor_p
(
tree
,
int
);
static
int
value_factor_p
PARAMS
((
tree
,
int
));
static
int
potential_alignment_gap
(
tree
,
tree
,
tree
);
static
int
potential_alignment_gap
PARAMS
((
tree
,
tree
,
tree
));
/* Initialize the association of GNAT nodes to GCC trees. */
/* Initialize the association of GNAT nodes to GCC trees. */
void
void
init_gnat_to_gnu
()
init_gnat_to_gnu
(
void
)
{
{
associate_gnat_to_gnu
associate_gnat_to_gnu
=
(
tree
*
)
ggc_alloc_cleared
(
max_gnat_nodes
*
sizeof
(
tree
));
=
(
tree
*
)
ggc_alloc_cleared
(
max_gnat_nodes
*
sizeof
(
tree
));
...
@@ -174,10 +173,7 @@ init_gnat_to_gnu ()
...
@@ -174,10 +173,7 @@ init_gnat_to_gnu ()
If GNU_DECL is zero, a previous association is to be reset. */
If GNU_DECL is zero, a previous association is to be reset. */
void
void
save_gnu_tree
(
gnat_entity
,
gnu_decl
,
no_check
)
save_gnu_tree
(
Entity_Id
gnat_entity
,
tree
gnu_decl
,
int
no_check
)
Entity_Id
gnat_entity
;
tree
gnu_decl
;
int
no_check
;
{
{
/* Check that GNAT_ENTITY is not already defined and that it is being set
/* Check that GNAT_ENTITY is not already defined and that it is being set
to something which is a decl. Raise gigi 401 if not. Usually, this
to something which is a decl. Raise gigi 401 if not. Usually, this
...
@@ -199,8 +195,7 @@ save_gnu_tree (gnat_entity, gnu_decl, no_check)
...
@@ -199,8 +195,7 @@ save_gnu_tree (gnat_entity, gnu_decl, no_check)
be elaborated only once, GNAT_ENTITY is really not an entity. */
be elaborated only once, GNAT_ENTITY is really not an entity. */
tree
tree
get_gnu_tree
(
gnat_entity
)
get_gnu_tree
(
Entity_Id
gnat_entity
)
Entity_Id
gnat_entity
;
{
{
if
(
!
associate_gnat_to_gnu
[
gnat_entity
-
First_Node_Id
])
if
(
!
associate_gnat_to_gnu
[
gnat_entity
-
First_Node_Id
])
gigi_abort
(
402
);
gigi_abort
(
402
);
...
@@ -211,8 +206,7 @@ get_gnu_tree (gnat_entity)
...
@@ -211,8 +206,7 @@ get_gnu_tree (gnat_entity)
/* Return nonzero if a GCC tree has been associated with GNAT_ENTITY. */
/* Return nonzero if a GCC tree has been associated with GNAT_ENTITY. */
int
int
present_gnu_tree
(
gnat_entity
)
present_gnu_tree
(
Entity_Id
gnat_entity
)
Entity_Id
gnat_entity
;
{
{
return
(
associate_gnat_to_gnu
[
gnat_entity
-
First_Node_Id
]
!=
NULL_TREE
);
return
(
associate_gnat_to_gnu
[
gnat_entity
-
First_Node_Id
]
!=
NULL_TREE
);
}
}
...
@@ -221,7 +215,7 @@ present_gnu_tree (gnat_entity)
...
@@ -221,7 +215,7 @@ present_gnu_tree (gnat_entity)
/* Return non-zero if we are currently in the global binding level. */
/* Return non-zero if we are currently in the global binding level. */
int
int
global_bindings_p
()
global_bindings_p
(
void
)
{
{
return
(
force_global
!=
0
||
current_binding_level
==
global_binding_level
return
(
force_global
!=
0
||
current_binding_level
==
global_binding_level
?
-
1
:
0
);
?
-
1
:
0
);
...
@@ -231,7 +225,7 @@ global_bindings_p ()
...
@@ -231,7 +225,7 @@ global_bindings_p ()
is in reverse order (it has to be so for back-end compatibility). */
is in reverse order (it has to be so for back-end compatibility). */
tree
tree
getdecls
()
getdecls
(
void
)
{
{
return
current_binding_level
->
names
;
return
current_binding_level
->
names
;
}
}
...
@@ -239,7 +233,7 @@ getdecls ()
...
@@ -239,7 +233,7 @@ getdecls ()
/* Nonzero if the current level needs to have a BLOCK made. */
/* Nonzero if the current level needs to have a BLOCK made. */
int
int
kept_level_p
()
kept_level_p
(
void
)
{
{
return
(
current_binding_level
->
names
!=
0
);
return
(
current_binding_level
->
names
!=
0
);
}
}
...
@@ -248,8 +242,7 @@ kept_level_p ()
...
@@ -248,8 +242,7 @@ kept_level_p ()
specified for back-end compatibility. */
specified for back-end compatibility. */
void
void
pushlevel
(
ignore
)
pushlevel
(
int
ignore
ATTRIBUTE_UNUSED
)
int
ignore
ATTRIBUTE_UNUSED
;
{
{
struct
binding_level
*
newlevel
=
NULL
;
struct
binding_level
*
newlevel
=
NULL
;
...
@@ -287,10 +280,7 @@ pushlevel (ignore)
...
@@ -287,10 +280,7 @@ pushlevel (ignore)
them into the BLOCK. */
them into the BLOCK. */
tree
tree
poplevel
(
keep
,
reverse
,
functionbody
)
poplevel
(
int
keep
,
int
reverse
,
int
functionbody
)
int
keep
;
int
reverse
;
int
functionbody
;
{
{
/* Points to a GCC BLOCK tree node. This is the BLOCK node construted for the
/* Points to a GCC BLOCK tree node. This is the BLOCK node construted for the
binding level that we are about to exit and which is returned by this
binding level that we are about to exit and which is returned by this
...
@@ -396,8 +386,7 @@ poplevel (keep, reverse, functionbody)
...
@@ -396,8 +386,7 @@ poplevel (keep, reverse, functionbody)
to handle the BLOCK node inside the BIND_EXPR. */
to handle the BLOCK node inside the BIND_EXPR. */
void
void
insert_block
(
block
)
insert_block
(
tree
block
)
tree
block
;
{
{
TREE_USED
(
block
)
=
1
;
TREE_USED
(
block
)
=
1
;
current_binding_level
->
blocks
current_binding_level
->
blocks
...
@@ -408,8 +397,7 @@ insert_block (block)
...
@@ -408,8 +397,7 @@ insert_block (block)
(the one we are currently in). */
(the one we are currently in). */
void
void
set_block
(
block
)
set_block
(
tree
block
)
tree
block
;
{
{
current_binding_level
->
this_block
=
block
;
current_binding_level
->
this_block
=
block
;
current_binding_level
->
names
=
chainon
(
current_binding_level
->
names
,
current_binding_level
->
names
=
chainon
(
current_binding_level
->
names
,
...
@@ -422,8 +410,7 @@ set_block (block)
...
@@ -422,8 +410,7 @@ set_block (block)
Returns the ..._DECL node. */
Returns the ..._DECL node. */
tree
tree
pushdecl
(
decl
)
pushdecl
(
tree
decl
)
tree
decl
;
{
{
struct
binding_level
*
b
;
struct
binding_level
*
b
;
...
@@ -478,7 +465,7 @@ pushdecl (decl)
...
@@ -478,7 +465,7 @@ pushdecl (decl)
front end has been run. */
front end has been run. */
void
void
gnat_init_decl_processing
()
gnat_init_decl_processing
(
void
)
{
{
input_line
=
0
;
input_line
=
0
;
...
@@ -516,8 +503,7 @@ gnat_init_decl_processing ()
...
@@ -516,8 +503,7 @@ gnat_init_decl_processing ()
in the gcc back-end and initialize the global binding level. */
in the gcc back-end and initialize the global binding level. */
void
void
init_gigi_decls
(
long_long_float_type
,
exception_type
)
init_gigi_decls
(
tree
long_long_float_type
,
tree
exception_type
)
tree
long_long_float_type
,
exception_type
;
{
{
tree
endlink
,
decl
;
tree
endlink
,
decl
;
unsigned
int
i
;
unsigned
int
i
;
...
@@ -708,11 +694,10 @@ init_gigi_decls (long_long_float_type, exception_type)
...
@@ -708,11 +694,10 @@ init_gigi_decls (long_long_float_type, exception_type)
on this type; it will be done later. */
on this type; it will be done later. */
void
void
finish_record_type
(
record_type
,
fieldlist
,
has_rep
,
defer_debug
)
finish_record_type
(
tree
record_type
,
tree
record_type
;
tree
fieldlist
,
tree
fieldlist
;
int
has_rep
,
int
has_rep
;
int
defer_debug
)
int
defer_debug
;
{
{
enum
tree_code
code
=
TREE_CODE
(
record_type
);
enum
tree_code
code
=
TREE_CODE
(
record_type
);
tree
ada_size
=
bitsize_zero_node
;
tree
ada_size
=
bitsize_zero_node
;
...
@@ -1030,11 +1015,11 @@ finish_record_type (record_type, fieldlist, has_rep, defer_debug)
...
@@ -1030,11 +1015,11 @@ finish_record_type (record_type, fieldlist, has_rep, defer_debug)
We return an expression for the size. */
We return an expression for the size. */
static
tree
static
tree
merge_sizes
(
last_size
,
first_bit
,
size
,
special
,
has_rep
)
merge_sizes
(
tree
last_size
,
tree
last_size
;
tree
first_bit
,
tree
first_bit
,
size
;
tree
size
,
int
special
;
int
special
,
int
has_rep
;
int
has_rep
)
{
{
tree
type
=
TREE_TYPE
(
last_size
);
tree
type
=
TREE_TYPE
(
last_size
);
tree
new
;
tree
new
;
...
@@ -1070,8 +1055,7 @@ merge_sizes (last_size, first_bit, size, special, has_rep)
...
@@ -1070,8 +1055,7 @@ merge_sizes (last_size, first_bit, size, special, has_rep)
related by the addition of a constant. Return that constant if so. */
related by the addition of a constant. Return that constant if so. */
static
tree
static
tree
compute_related_constant
(
op0
,
op1
)
compute_related_constant
(
tree
op0
,
tree
op1
)
tree
op0
,
op1
;
{
{
tree
op0_var
,
op1_var
;
tree
op0_var
,
op1_var
;
tree
op0_con
=
split_plus
(
op0
,
&
op0_var
);
tree
op0_con
=
split_plus
(
op0
,
&
op0_var
);
...
@@ -1092,9 +1076,7 @@ compute_related_constant (op0, op1)
...
@@ -1092,9 +1076,7 @@ compute_related_constant (op0, op1)
bitsizetype. */
bitsizetype. */
static
tree
static
tree
split_plus
(
in
,
pvar
)
split_plus
(
tree
in
,
tree
*
pvar
)
tree
in
;
tree
*
pvar
;
{
{
/* Strip NOPS in order to ease the tree traversal and maximize the
/* Strip NOPS in order to ease the tree traversal and maximize the
potential for constant or plus/minus discovery. We need to be careful
potential for constant or plus/minus discovery. We need to be careful
...
@@ -1137,12 +1119,12 @@ split_plus (in, pvar)
...
@@ -1137,12 +1119,12 @@ split_plus (in, pvar)
depressed stack pointer. */
depressed stack pointer. */
tree
tree
create_subprog_type
(
return_type
,
param_decl_list
,
cico_list
,
create_subprog_type
(
tree
return_type
,
returns_unconstrained
,
returns_by_ref
,
returns_with_dsp
)
tree
param_decl_list
,
tree
return_type
;
tree
cico_list
,
tree
param_decl_list
;
int
returns_unconstrained
,
tree
cico_list
;
int
returns_by_ref
,
int
returns_unconstrained
,
returns_by_ref
,
returns_with_dsp
;
int
returns_with_dsp
)
{
{
/* A chain of TREE_LIST nodes whose TREE_VALUEs are the data type nodes of
/* A chain of TREE_LIST nodes whose TREE_VALUEs are the data type nodes of
the subprogram formal parameters. This list is generated by traversing the
the subprogram formal parameters. This list is generated by traversing the
...
@@ -1186,8 +1168,7 @@ create_subprog_type (return_type, param_decl_list, cico_list,
...
@@ -1186,8 +1168,7 @@ create_subprog_type (return_type, param_decl_list, cico_list,
/* Return a copy of TYPE but safe to modify in any way. */
/* Return a copy of TYPE but safe to modify in any way. */
tree
tree
copy_type
(
type
)
copy_type
(
tree
type
)
tree
type
;
{
{
tree
new
=
copy_node
(
type
);
tree
new
=
copy_node
(
type
);
...
@@ -1207,9 +1188,7 @@ copy_type (type)
...
@@ -1207,9 +1188,7 @@ copy_type (type)
TYPE_INDEX_TYPE is INDEX. */
TYPE_INDEX_TYPE is INDEX. */
tree
tree
create_index_type
(
min
,
max
,
index
)
create_index_type
(
tree
min
,
tree
max
,
tree
index
)
tree
min
,
max
;
tree
index
;
{
{
/* First build a type for the desired range. */
/* First build a type for the desired range. */
tree
type
=
build_index_2_type
(
min
,
max
);
tree
type
=
build_index_2_type
(
min
,
max
);
...
@@ -1235,12 +1214,11 @@ create_index_type (min, max, index)
...
@@ -1235,12 +1214,11 @@ create_index_type (min, max, index)
information about this type. */
information about this type. */
tree
tree
create_type_decl
(
type_name
,
type
,
attr_list
,
artificial_p
,
debug_info_p
)
create_type_decl
(
tree
type_name
,
tree
type_name
;
tree
type
,
tree
type
;
struct
attrib
*
attr_list
,
struct
attrib
*
attr_list
;
int
artificial_p
,
int
artificial_p
;
int
debug_info_p
)
int
debug_info_p
;
{
{
tree
type_decl
=
build_decl
(
TYPE_DECL
,
type_name
,
type
);
tree
type_decl
=
build_decl
(
TYPE_DECL
,
type_name
,
type
);
enum
tree_code
code
=
TREE_CODE
(
type
);
enum
tree_code
code
=
TREE_CODE
(
type
);
...
@@ -1282,17 +1260,15 @@ create_type_decl (type_name, type, attr_list, artificial_p, debug_info_p)
...
@@ -1282,17 +1260,15 @@ create_type_decl (type_name, type, attr_list, artificial_p, debug_info_p)
it indicates whether to always allocate storage to the variable. */
it indicates whether to always allocate storage to the variable. */
tree
tree
create_var_decl
(
var_name
,
asm_name
,
type
,
var_init
,
const_flag
,
public_flag
,
create_var_decl
(
tree
var_name
,
extern_flag
,
static_flag
,
attr_list
)
tree
asm_name
,
tree
var_name
;
tree
type
,
tree
asm_name
;
tree
var_init
,
tree
type
;
int
const_flag
,
tree
var_init
;
int
public_flag
,
int
const_flag
;
int
extern_flag
,
int
public_flag
;
int
static_flag
,
int
extern_flag
;
struct
attrib
*
attr_list
)
int
static_flag
;
struct
attrib
*
attr_list
;
{
{
int
init_const
int
init_const
=
(
var_init
==
0
=
(
var_init
==
0
...
@@ -1397,14 +1373,13 @@ create_var_decl (var_name, asm_name, type, var_init, const_flag, public_flag,
...
@@ -1397,14 +1373,13 @@ create_var_decl (var_name, asm_name, type, var_init, const_flag, public_flag,
the address of this field for aliasing purposes. */
the address of this field for aliasing purposes. */
tree
tree
create_field_decl
(
field_name
,
field_type
,
record_type
,
packed
,
size
,
pos
,
create_field_decl
(
tree
field_name
,
addressable
)
tree
field_type
,
tree
field_name
;
tree
record_type
,
tree
field_type
;
int
packed
,
tree
record_type
;
tree
size
,
int
packed
;
tree
pos
,
tree
size
,
pos
;
int
addressable
)
int
addressable
;
{
{
tree
field_decl
=
build_decl
(
FIELD_DECL
,
field_name
,
field_type
);
tree
field_decl
=
build_decl
(
FIELD_DECL
,
field_name
,
field_type
);
...
@@ -1515,8 +1490,7 @@ create_field_decl (field_name, field_type, record_type, packed, size, pos,
...
@@ -1515,8 +1490,7 @@ create_field_decl (field_name, field_type, record_type, packed, size, pos,
effects, has the value of zero. */
effects, has the value of zero. */
static
int
static
int
value_zerop
(
exp
)
value_zerop
(
tree
exp
)
tree
exp
;
{
{
if
(
TREE_CODE
(
exp
)
==
COMPOUND_EXPR
)
if
(
TREE_CODE
(
exp
)
==
COMPOUND_EXPR
)
return
value_zerop
(
TREE_OPERAND
(
exp
,
1
));
return
value_zerop
(
TREE_OPERAND
(
exp
,
1
));
...
@@ -1530,10 +1504,7 @@ value_zerop (exp)
...
@@ -1530,10 +1504,7 @@ value_zerop (exp)
parameter). */
parameter). */
tree
tree
create_param_decl
(
param_name
,
param_type
,
readonly
)
create_param_decl
(
tree
param_name
,
tree
param_type
,
int
readonly
)
tree
param_name
;
tree
param_type
;
int
readonly
;
{
{
tree
param_decl
=
build_decl
(
PARM_DECL
,
param_name
,
param_type
);
tree
param_decl
=
build_decl
(
PARM_DECL
,
param_name
,
param_type
);
...
@@ -1570,9 +1541,7 @@ create_param_decl (param_name, param_type, readonly)
...
@@ -1570,9 +1541,7 @@ create_param_decl (param_name, param_type, readonly)
/* Given a DECL and ATTR_LIST, process the listed attributes. */
/* Given a DECL and ATTR_LIST, process the listed attributes. */
void
void
process_attributes
(
decl
,
attr_list
)
process_attributes
(
tree
decl
,
struct
attrib
*
attr_list
)
tree
decl
;
struct
attrib
*
attr_list
;
{
{
for
(;
attr_list
;
attr_list
=
attr_list
->
next
)
for
(;
attr_list
;
attr_list
=
attr_list
->
next
)
switch
(
attr_list
->
type
)
switch
(
attr_list
->
type
)
...
@@ -1613,9 +1582,7 @@ process_attributes (decl, attr_list)
...
@@ -1613,9 +1582,7 @@ process_attributes (decl, attr_list)
/* Add some pending elaborations on the list. */
/* Add some pending elaborations on the list. */
void
void
add_pending_elaborations
(
var_decl
,
var_init
)
add_pending_elaborations
(
tree
var_decl
,
tree
var_init
)
tree
var_decl
;
tree
var_init
;
{
{
if
(
var_init
!=
0
)
if
(
var_init
!=
0
)
Check_Elaboration_Code_Allowed
(
error_gnat_node
);
Check_Elaboration_Code_Allowed
(
error_gnat_node
);
...
@@ -1627,7 +1594,7 @@ add_pending_elaborations (var_decl, var_init)
...
@@ -1627,7 +1594,7 @@ add_pending_elaborations (var_decl, var_init)
/* Obtain any pending elaborations and clear the old list. */
/* Obtain any pending elaborations and clear the old list. */
tree
tree
get_pending_elaborations
()
get_pending_elaborations
(
void
)
{
{
/* Each thing added to the list went on the end; we want it on the
/* Each thing added to the list went on the end; we want it on the
beginning. */
beginning. */
...
@@ -1641,9 +1608,7 @@ get_pending_elaborations ()
...
@@ -1641,9 +1608,7 @@ get_pending_elaborations ()
of 2. */
of 2. */
static
int
static
int
value_factor_p
(
value
,
factor
)
value_factor_p
(
tree
value
,
int
factor
)
tree
value
;
int
factor
;
{
{
if
(
host_integerp
(
value
,
1
))
if
(
host_integerp
(
value
,
1
))
return
tree_low_cst
(
value
,
1
)
%
factor
==
0
;
return
tree_low_cst
(
value
,
1
)
%
factor
==
0
;
...
@@ -1662,10 +1627,7 @@ value_factor_p (value, factor)
...
@@ -1662,10 +1627,7 @@ value_factor_p (value, factor)
position of CURR_FIELD. It is ignored if null. */
position of CURR_FIELD. It is ignored if null. */
static
int
static
int
potential_alignment_gap
(
prev_field
,
curr_field
,
offset
)
potential_alignment_gap
(
tree
prev_field
,
tree
curr_field
,
tree
offset
)
tree
prev_field
;
tree
curr_field
;
tree
offset
;
{
{
/* If this is the first field of the record, there cannot be any gap */
/* If this is the first field of the record, there cannot be any gap */
if
(
!
prev_field
)
if
(
!
prev_field
)
...
@@ -1707,7 +1669,7 @@ potential_alignment_gap (prev_field, curr_field, offset)
...
@@ -1707,7 +1669,7 @@ potential_alignment_gap (prev_field, curr_field, offset)
/* Return nonzero if there are pending elaborations. */
/* Return nonzero if there are pending elaborations. */
int
int
pending_elaborations_p
()
pending_elaborations_p
(
void
)
{
{
return
TREE_CHAIN
(
pending_elaborations
)
!=
0
;
return
TREE_CHAIN
(
pending_elaborations
)
!=
0
;
}
}
...
@@ -1716,7 +1678,7 @@ pending_elaborations_p ()
...
@@ -1716,7 +1678,7 @@ pending_elaborations_p ()
one. */
one. */
void
void
push_pending_elaborations
()
push_pending_elaborations
(
void
)
{
{
struct
e_stack
*
p
=
(
struct
e_stack
*
)
ggc_alloc
(
sizeof
(
struct
e_stack
));
struct
e_stack
*
p
=
(
struct
e_stack
*
)
ggc_alloc
(
sizeof
(
struct
e_stack
));
...
@@ -1729,7 +1691,7 @@ push_pending_elaborations ()
...
@@ -1729,7 +1691,7 @@ push_pending_elaborations ()
/* Pop the stack of pending elaborations. */
/* Pop the stack of pending elaborations. */
void
void
pop_pending_elaborations
()
pop_pending_elaborations
(
void
)
{
{
struct
e_stack
*
p
=
elist_stack
;
struct
e_stack
*
p
=
elist_stack
;
...
@@ -1741,7 +1703,7 @@ pop_pending_elaborations ()
...
@@ -1741,7 +1703,7 @@ pop_pending_elaborations ()
elaborations after that point. */
elaborations after that point. */
tree
tree
get_elaboration_location
()
get_elaboration_location
(
void
)
{
{
return
tree_last
(
pending_elaborations
);
return
tree_last
(
pending_elaborations
);
}
}
...
@@ -1750,8 +1712,7 @@ get_elaboration_location ()
...
@@ -1750,8 +1712,7 @@ get_elaboration_location ()
list. */
list. */
void
void
insert_elaboration_list
(
elab
)
insert_elaboration_list
(
tree
elab
)
tree
elab
;
{
{
tree
next
=
TREE_CHAIN
(
elab
);
tree
next
=
TREE_CHAIN
(
elab
);
...
@@ -1766,8 +1727,7 @@ insert_elaboration_list (elab)
...
@@ -1766,8 +1727,7 @@ insert_elaboration_list (elab)
/* Returns a LABEL_DECL node for LABEL_NAME. */
/* Returns a LABEL_DECL node for LABEL_NAME. */
tree
tree
create_label_decl
(
label_name
)
create_label_decl
(
tree
label_name
)
tree
label_name
;
{
{
tree
label_decl
=
build_decl
(
LABEL_DECL
,
label_name
,
void_type_node
);
tree
label_decl
=
build_decl
(
LABEL_DECL
,
label_name
,
void_type_node
);
...
@@ -1787,16 +1747,14 @@ create_label_decl (label_name)
...
@@ -1787,16 +1747,14 @@ create_label_decl (label_name)
appropriate fields in the FUNCTION_DECL. */
appropriate fields in the FUNCTION_DECL. */
tree
tree
create_subprog_decl
(
subprog_name
,
asm_name
,
subprog_type
,
param_decl_list
,
create_subprog_decl
(
tree
subprog_name
,
inline_flag
,
public_flag
,
extern_flag
,
attr_list
)
tree
asm_name
,
tree
subprog_name
;
tree
subprog_type
,
tree
asm_name
;
tree
param_decl_list
,
tree
subprog_type
;
int
inline_flag
,
tree
param_decl_list
;
int
public_flag
,
int
inline_flag
;
int
extern_flag
,
int
public_flag
;
struct
attrib
*
attr_list
)
int
extern_flag
;
struct
attrib
*
attr_list
;
{
{
tree
return_type
=
TREE_TYPE
(
subprog_type
);
tree
return_type
=
TREE_TYPE
(
subprog_type
);
tree
subprog_decl
=
build_decl
(
FUNCTION_DECL
,
subprog_name
,
subprog_type
);
tree
subprog_decl
=
build_decl
(
FUNCTION_DECL
,
subprog_name
,
subprog_type
);
...
@@ -1842,8 +1800,7 @@ static int function_nesting_depth;
...
@@ -1842,8 +1800,7 @@ static int function_nesting_depth;
appearing in the subprogram. */
appearing in the subprogram. */
void
void
begin_subprog_body
(
subprog_decl
)
begin_subprog_body
(
tree
subprog_decl
)
tree
subprog_decl
;
{
{
tree
param_decl_list
;
tree
param_decl_list
;
tree
param_decl
;
tree
param_decl
;
...
@@ -1905,7 +1862,7 @@ begin_subprog_body (subprog_decl)
...
@@ -1905,7 +1862,7 @@ begin_subprog_body (subprog_decl)
to assembler language output. */
to assembler language output. */
void
void
end_subprog_body
()
end_subprog_body
(
void
)
{
{
tree
decl
;
tree
decl
;
tree
cico_list
;
tree
cico_list
;
...
@@ -1979,13 +1936,12 @@ end_subprog_body ()
...
@@ -1979,13 +1936,12 @@ end_subprog_body ()
ATTRS is nonzero, use that for the function attribute list. */
ATTRS is nonzero, use that for the function attribute list. */
tree
tree
builtin_function
(
name
,
type
,
function_code
,
class
,
library_name
,
attrs
)
builtin_function
(
const
char
*
name
,
const
char
*
name
;
tree
type
,
tree
type
;
int
function_code
,
int
function_code
;
enum
built_in_class
class
,
enum
built_in_class
class
;
const
char
*
library_name
,
const
char
*
library_name
;
tree
attrs
)
tree
attrs
;
{
{
tree
decl
=
build_decl
(
FUNCTION_DECL
,
get_identifier
(
name
),
type
);
tree
decl
=
build_decl
(
FUNCTION_DECL
,
get_identifier
(
name
),
type
);
...
@@ -2007,9 +1963,7 @@ builtin_function (name, type, function_code, class, library_name, attrs)
...
@@ -2007,9 +1963,7 @@ builtin_function (name, type, function_code, class, library_name, attrs)
it is a signed type. */
it is a signed type. */
tree
tree
gnat_type_for_size
(
precision
,
unsignedp
)
gnat_type_for_size
(
unsigned
precision
,
int
unsignedp
)
unsigned
precision
;
int
unsignedp
;
{
{
tree
t
;
tree
t
;
char
type_name
[
20
];
char
type_name
[
20
];
...
@@ -2038,9 +1992,7 @@ gnat_type_for_size (precision, unsignedp)
...
@@ -2038,9 +1992,7 @@ gnat_type_for_size (precision, unsignedp)
/* Likewise for floating-point types. */
/* Likewise for floating-point types. */
static
tree
static
tree
float_type_for_size
(
precision
,
mode
)
float_type_for_size
(
int
precision
,
enum
machine_mode
mode
)
int
precision
;
enum
machine_mode
mode
;
{
{
tree
t
;
tree
t
;
char
type_name
[
20
];
char
type_name
[
20
];
...
@@ -2068,9 +2020,7 @@ float_type_for_size (precision, mode)
...
@@ -2068,9 +2020,7 @@ float_type_for_size (precision, mode)
an unsigned type; otherwise a signed type is returned. */
an unsigned type; otherwise a signed type is returned. */
tree
tree
gnat_type_for_mode
(
mode
,
unsignedp
)
gnat_type_for_mode
(
enum
machine_mode
mode
,
int
unsignedp
)
enum
machine_mode
mode
;
int
unsignedp
;
{
{
if
(
GET_MODE_CLASS
(
mode
)
==
MODE_FLOAT
)
if
(
GET_MODE_CLASS
(
mode
)
==
MODE_FLOAT
)
return
float_type_for_size
(
GET_MODE_BITSIZE
(
mode
),
mode
);
return
float_type_for_size
(
GET_MODE_BITSIZE
(
mode
),
mode
);
...
@@ -2081,8 +2031,7 @@ gnat_type_for_mode (mode, unsignedp)
...
@@ -2081,8 +2031,7 @@ gnat_type_for_mode (mode, unsignedp)
/* Return the unsigned version of a TYPE_NODE, a scalar type. */
/* Return the unsigned version of a TYPE_NODE, a scalar type. */
tree
tree
gnat_unsigned_type
(
type_node
)
gnat_unsigned_type
(
tree
type_node
)
tree
type_node
;
{
{
tree
type
=
gnat_type_for_size
(
TYPE_PRECISION
(
type_node
),
1
);
tree
type
=
gnat_type_for_size
(
TYPE_PRECISION
(
type_node
),
1
);
...
@@ -2105,8 +2054,7 @@ gnat_unsigned_type (type_node)
...
@@ -2105,8 +2054,7 @@ gnat_unsigned_type (type_node)
/* Return the signed version of a TYPE_NODE, a scalar type. */
/* Return the signed version of a TYPE_NODE, a scalar type. */
tree
tree
gnat_signed_type
(
type_node
)
gnat_signed_type
(
tree
type_node
)
tree
type_node
;
{
{
tree
type
=
gnat_type_for_size
(
TYPE_PRECISION
(
type_node
),
0
);
tree
type
=
gnat_type_for_size
(
TYPE_PRECISION
(
type_node
),
0
);
...
@@ -2130,9 +2078,7 @@ gnat_signed_type (type_node)
...
@@ -2130,9 +2078,7 @@ gnat_signed_type (type_node)
UNSIGNEDP. */
UNSIGNEDP. */
tree
tree
gnat_signed_or_unsigned_type
(
unsignedp
,
type
)
gnat_signed_or_unsigned_type
(
int
unsignedp
,
tree
type
)
int
unsignedp
;
tree
type
;
{
{
if
(
!
INTEGRAL_TYPE_P
(
type
)
||
TREE_UNSIGNED
(
type
)
==
unsignedp
)
if
(
!
INTEGRAL_TYPE_P
(
type
)
||
TREE_UNSIGNED
(
type
)
==
unsignedp
)
return
type
;
return
type
;
...
@@ -2145,9 +2091,7 @@ gnat_signed_or_unsigned_type (unsignedp, type)
...
@@ -2145,9 +2091,7 @@ gnat_signed_or_unsigned_type (unsignedp, type)
minimum (if ! MAX_P) possible value of the discriminant. */
minimum (if ! MAX_P) possible value of the discriminant. */
tree
tree
max_size
(
exp
,
max_p
)
max_size
(
tree
exp
,
int
max_p
)
tree
exp
;
int
max_p
;
{
{
enum
tree_code
code
=
TREE_CODE
(
exp
);
enum
tree_code
code
=
TREE_CODE
(
exp
);
tree
type
=
TREE_TYPE
(
exp
);
tree
type
=
TREE_TYPE
(
exp
);
...
@@ -2246,10 +2190,7 @@ max_size (exp, max_p)
...
@@ -2246,10 +2190,7 @@ max_size (exp, max_p)
Return a constructor for the template. */
Return a constructor for the template. */
tree
tree
build_template
(
template_type
,
array_type
,
expr
)
build_template
(
tree
template_type
,
tree
array_type
,
tree
expr
)
tree
template_type
;
tree
array_type
;
tree
expr
;
{
{
tree
template_elts
=
NULL_TREE
;
tree
template_elts
=
NULL_TREE
;
tree
bound_list
=
NULL_TREE
;
tree
bound_list
=
NULL_TREE
;
...
@@ -2318,10 +2259,7 @@ build_template (template_type, array_type, expr)
...
@@ -2318,10 +2259,7 @@ build_template (template_type, array_type, expr)
an object of that type and also for the name. */
an object of that type and also for the name. */
tree
tree
build_vms_descriptor
(
type
,
mech
,
gnat_entity
)
build_vms_descriptor
(
tree
type
,
Mechanism_Type
mech
,
Entity_Id
gnat_entity
)
tree
type
;
Mechanism_Type
mech
;
Entity_Id
gnat_entity
;
{
{
tree
record_type
=
make_node
(
RECORD_TYPE
);
tree
record_type
=
make_node
(
RECORD_TYPE
);
tree
field_list
=
0
;
tree
field_list
=
0
;
...
@@ -2606,11 +2544,7 @@ build_vms_descriptor (type, mech, gnat_entity)
...
@@ -2606,11 +2544,7 @@ build_vms_descriptor (type, mech, gnat_entity)
/* Utility routine for above code to make a field. */
/* Utility routine for above code to make a field. */
static
tree
static
tree
make_descriptor_field
(
name
,
type
,
rec_type
,
initial
)
make_descriptor_field
(
const
char
*
name
,
tree
type
,
tree
rec_type
,
tree
initial
)
const
char
*
name
;
tree
type
;
tree
rec_type
;
tree
initial
;
{
{
tree
field
tree
field
=
create_field_decl
(
get_identifier
(
name
),
type
,
rec_type
,
0
,
0
,
0
,
0
);
=
create_field_decl
(
get_identifier
(
name
),
type
,
rec_type
,
0
,
0
,
0
,
0
);
...
@@ -2627,10 +2561,7 @@ make_descriptor_field (name, type, rec_type, initial)
...
@@ -2627,10 +2561,7 @@ make_descriptor_field (name, type, rec_type, initial)
as the name of the record. */
as the name of the record. */
tree
tree
build_unc_object_type
(
template_type
,
object_type
,
name
)
build_unc_object_type
(
tree
template_type
,
tree
object_type
,
tree
name
)
tree
template_type
;
tree
object_type
;
tree
name
;
{
{
tree
type
=
make_node
(
RECORD_TYPE
);
tree
type
=
make_node
(
RECORD_TYPE
);
tree
template_field
=
create_field_decl
(
get_identifier
(
"BOUNDS"
),
tree
template_field
=
create_field_decl
(
get_identifier
(
"BOUNDS"
),
...
@@ -2653,9 +2584,7 @@ build_unc_object_type (template_type, object_type, name)
...
@@ -2653,9 +2584,7 @@ build_unc_object_type (template_type, object_type, name)
if NEW is an UNCONSTRAINED_ARRAY_TYPE. */
if NEW is an UNCONSTRAINED_ARRAY_TYPE. */
void
void
update_pointer_to
(
old_type
,
new_type
)
update_pointer_to
(
tree
old_type
,
tree
new_type
)
tree
old_type
;
tree
new_type
;
{
{
tree
ptr
=
TYPE_POINTER_TO
(
old_type
);
tree
ptr
=
TYPE_POINTER_TO
(
old_type
);
tree
ref
=
TYPE_REFERENCE_TO
(
old_type
);
tree
ref
=
TYPE_REFERENCE_TO
(
old_type
);
...
@@ -2792,9 +2721,7 @@ update_pointer_to (old_type, new_type)
...
@@ -2792,9 +2721,7 @@ update_pointer_to (old_type, new_type)
pointer. This involves making or finding a template. */
pointer. This involves making or finding a template. */
static
tree
static
tree
convert_to_fat_pointer
(
type
,
expr
)
convert_to_fat_pointer
(
tree
type
,
tree
expr
)
tree
type
;
tree
expr
;
{
{
tree
template_type
=
TREE_TYPE
(
TREE_TYPE
(
TREE_CHAIN
(
TYPE_FIELDS
(
type
))));
tree
template_type
=
TREE_TYPE
(
TREE_TYPE
(
TREE_CHAIN
(
TYPE_FIELDS
(
type
))));
tree
template
,
template_addr
;
tree
template
,
template_addr
;
...
@@ -2861,9 +2788,7 @@ convert_to_fat_pointer (type, expr)
...
@@ -2861,9 +2788,7 @@ convert_to_fat_pointer (type, expr)
is not already a fat pointer. */
is not already a fat pointer. */
static
tree
static
tree
convert_to_thin_pointer
(
type
,
expr
)
convert_to_thin_pointer
(
tree
type
,
tree
expr
)
tree
type
;
tree
expr
;
{
{
if
(
!
TYPE_FAT_POINTER_P
(
TREE_TYPE
(
expr
)))
if
(
!
TYPE_FAT_POINTER_P
(
TREE_TYPE
(
expr
)))
expr
expr
...
@@ -2886,8 +2811,7 @@ convert_to_thin_pointer (type, expr)
...
@@ -2886,8 +2811,7 @@ convert_to_thin_pointer (type, expr)
not permitted by the language being compiled. */
not permitted by the language being compiled. */
tree
tree
convert
(
type
,
expr
)
convert
(
tree
type
,
tree
expr
)
tree
type
,
expr
;
{
{
enum
tree_code
code
=
TREE_CODE
(
type
);
enum
tree_code
code
=
TREE_CODE
(
type
);
tree
etype
=
TREE_TYPE
(
expr
);
tree
etype
=
TREE_TYPE
(
expr
);
...
@@ -3229,9 +3153,7 @@ convert (type, expr)
...
@@ -3229,9 +3153,7 @@ convert (type, expr)
the address is not bit-aligned. */
the address is not bit-aligned. */
tree
tree
remove_conversions
(
exp
,
true_address
)
remove_conversions
(
tree
exp
,
int
true_address
)
tree
exp
;
int
true_address
;
{
{
switch
(
TREE_CODE
(
exp
))
switch
(
TREE_CODE
(
exp
))
{
{
...
@@ -3264,8 +3186,7 @@ remove_conversions (exp, true_address)
...
@@ -3264,8 +3186,7 @@ remove_conversions (exp, true_address)
likewise return an expression pointing to the underlying array. */
likewise return an expression pointing to the underlying array. */
tree
tree
maybe_unconstrained_array
(
exp
)
maybe_unconstrained_array
(
tree
exp
)
tree
exp
;
{
{
enum
tree_code
code
=
TREE_CODE
(
exp
);
enum
tree_code
code
=
TREE_CODE
(
exp
);
tree
new
;
tree
new
;
...
@@ -3327,10 +3248,7 @@ maybe_unconstrained_array (exp)
...
@@ -3327,10 +3248,7 @@ maybe_unconstrained_array (exp)
If NOTRUNC_P is set, truncation operations should be suppressed. */
If NOTRUNC_P is set, truncation operations should be suppressed. */
tree
tree
unchecked_convert
(
type
,
expr
,
notrunc_p
)
unchecked_convert
(
tree
type
,
tree
expr
,
int
notrunc_p
)
tree
type
;
tree
expr
;
int
notrunc_p
;
{
{
tree
etype
=
TREE_TYPE
(
expr
);
tree
etype
=
TREE_TYPE
(
expr
);
...
...
gcc/ada/utils2.c
View file @
9373164a
...
@@ -44,13 +44,12 @@
...
@@ -44,13 +44,12 @@
#include "ada-tree.h"
#include "ada-tree.h"
#include "gigi.h"
#include "gigi.h"
static
tree
find_common_type
PARAMS
((
tree
,
tree
));
static
tree
find_common_type
(
tree
,
tree
);
static
int
contains_save_expr_p
PARAMS
((
tree
));
static
int
contains_save_expr_p
(
tree
);
static
tree
contains_null_expr
PARAMS
((
tree
));
static
tree
contains_null_expr
(
tree
);
static
tree
compare_arrays
PARAMS
((
tree
,
tree
,
tree
));
static
tree
compare_arrays
(
tree
,
tree
,
tree
);
static
tree
nonbinary_modular_operation
PARAMS
((
enum
tree_code
,
tree
,
static
tree
nonbinary_modular_operation
(
enum
tree_code
,
tree
,
tree
,
tree
);
tree
,
tree
));
static
tree
build_simple_component_ref
(
tree
,
tree
,
tree
,
int
);
static
tree
build_simple_component_ref
PARAMS
((
tree
,
tree
,
tree
,
int
));
/* Prepare expr to be an argument of a TRUTH_NOT_EXPR or other logical
/* Prepare expr to be an argument of a TRUTH_NOT_EXPR or other logical
operation.
operation.
...
@@ -68,8 +67,7 @@ static tree build_simple_component_ref PARAMS ((tree, tree, tree, int));
...
@@ -68,8 +67,7 @@ static tree build_simple_component_ref PARAMS ((tree, tree, tree, int));
the only possible operands will be things of Boolean type. */
the only possible operands will be things of Boolean type. */
tree
tree
gnat_truthvalue_conversion
(
expr
)
gnat_truthvalue_conversion
(
tree
expr
)
tree
expr
;
{
{
tree
type
=
TREE_TYPE
(
expr
);
tree
type
=
TREE_TYPE
(
expr
);
...
@@ -106,8 +104,7 @@ gnat_truthvalue_conversion (expr)
...
@@ -106,8 +104,7 @@ gnat_truthvalue_conversion (expr)
/* Return the base type of TYPE. */
/* Return the base type of TYPE. */
tree
tree
get_base_type
(
type
)
get_base_type
(
tree
type
)
tree
type
;
{
{
if
(
TREE_CODE
(
type
)
==
RECORD_TYPE
if
(
TREE_CODE
(
type
)
==
RECORD_TYPE
&&
TYPE_LEFT_JUSTIFIED_MODULAR_P
(
type
))
&&
TYPE_LEFT_JUSTIFIED_MODULAR_P
(
type
))
...
@@ -123,8 +120,7 @@ get_base_type (type)
...
@@ -123,8 +120,7 @@ get_base_type (type)
/* Likewise, but only return types known to the Ada source. */
/* Likewise, but only return types known to the Ada source. */
tree
tree
get_ada_base_type
(
type
)
get_ada_base_type
(
tree
type
)
tree
type
;
{
{
while
(
TREE_TYPE
(
type
)
!=
0
while
(
TREE_TYPE
(
type
)
!=
0
&&
(
TREE_CODE
(
type
)
==
INTEGER_TYPE
&&
(
TREE_CODE
(
type
)
==
INTEGER_TYPE
...
@@ -140,8 +136,7 @@ get_ada_base_type (type)
...
@@ -140,8 +136,7 @@ get_ada_base_type (type)
in bits. If we don't know anything about the alignment, return 0. */
in bits. If we don't know anything about the alignment, return 0. */
unsigned
int
unsigned
int
known_alignment
(
exp
)
known_alignment
(
tree
exp
)
tree
exp
;
{
{
unsigned
int
this_alignment
;
unsigned
int
this_alignment
;
unsigned
int
lhs
,
rhs
;
unsigned
int
lhs
,
rhs
;
...
@@ -221,8 +216,7 @@ known_alignment (exp)
...
@@ -221,8 +216,7 @@ known_alignment (exp)
Otherwise return zero. */
Otherwise return zero. */
static
tree
static
tree
find_common_type
(
t1
,
t2
)
find_common_type
(
tree
t1
,
tree
t2
)
tree
t1
,
t2
;
{
{
/* If either type is non-BLKmode, use it. Note that we know that we will
/* If either type is non-BLKmode, use it. Note that we know that we will
not have any alignment problems since if we did the non-BLKmode
not have any alignment problems since if we did the non-BLKmode
...
@@ -251,8 +245,7 @@ find_common_type (t1, t2)
...
@@ -251,8 +245,7 @@ find_common_type (t1, t2)
of some very general solution. */
of some very general solution. */
static
int
static
int
contains_save_expr_p
(
exp
)
contains_save_expr_p
(
tree
exp
)
tree
exp
;
{
{
switch
(
TREE_CODE
(
exp
))
switch
(
TREE_CODE
(
exp
))
{
{
...
@@ -283,8 +276,7 @@ contains_save_expr_p (exp)
...
@@ -283,8 +276,7 @@ contains_save_expr_p (exp)
that are known to raise Constraint_Error. */
that are known to raise Constraint_Error. */
static
tree
static
tree
contains_null_expr
(
exp
)
contains_null_expr
(
tree
exp
)
tree
exp
;
{
{
tree
tem
;
tree
tem
;
...
@@ -339,9 +331,7 @@ contains_null_expr (exp)
...
@@ -339,9 +331,7 @@ contains_null_expr (exp)
length tests in as efficient a manner as possible. */
length tests in as efficient a manner as possible. */
static
tree
static
tree
compare_arrays
(
result_type
,
a1
,
a2
)
compare_arrays
(
tree
result_type
,
tree
a1
,
tree
a2
)
tree
a1
,
a2
;
tree
result_type
;
{
{
tree
t1
=
TREE_TYPE
(
a1
);
tree
t1
=
TREE_TYPE
(
a1
);
tree
t2
=
TREE_TYPE
(
a2
);
tree
t2
=
TREE_TYPE
(
a2
);
...
@@ -501,10 +491,10 @@ compare_arrays (result_type, a1, a2)
...
@@ -501,10 +491,10 @@ compare_arrays (result_type, a1, a2)
modulus. */
modulus. */
static
tree
static
tree
nonbinary_modular_operation
(
op_code
,
type
,
lhs
,
rhs
)
nonbinary_modular_operation
(
enum
tree_code
op_code
,
enum
tree_code
op_code
;
tree
type
,
tree
type
;
tree
lhs
,
tree
lhs
,
rhs
;
tree
rhs
)
{
{
tree
modulus
=
TYPE_MODULUS
(
type
);
tree
modulus
=
TYPE_MODULUS
(
type
);
unsigned
int
needed_precision
=
tree_floor_log2
(
modulus
)
+
1
;
unsigned
int
needed_precision
=
tree_floor_log2
(
modulus
)
+
1
;
...
@@ -601,11 +591,10 @@ nonbinary_modular_operation (op_code, type, lhs, rhs)
...
@@ -601,11 +591,10 @@ nonbinary_modular_operation (op_code, type, lhs, rhs)
have to do here is validate the work done by SEM and handle subtypes. */
have to do here is validate the work done by SEM and handle subtypes. */
tree
tree
build_binary_op
(
op_code
,
result_type
,
left_operand
,
right_operand
)
build_binary_op
(
enum
tree_code
op_code
,
enum
tree_code
op_code
;
tree
result_type
,
tree
result_type
;
tree
left_operand
,
tree
left_operand
;
tree
right_operand
)
tree
right_operand
;
{
{
tree
left_type
=
TREE_TYPE
(
left_operand
);
tree
left_type
=
TREE_TYPE
(
left_operand
);
tree
right_type
=
TREE_TYPE
(
right_operand
);
tree
right_type
=
TREE_TYPE
(
right_operand
);
...
@@ -1094,10 +1083,7 @@ build_binary_op (op_code, result_type, left_operand, right_operand)
...
@@ -1094,10 +1083,7 @@ build_binary_op (op_code, result_type, left_operand, right_operand)
/* Similar, but for unary operations. */
/* Similar, but for unary operations. */
tree
tree
build_unary_op
(
op_code
,
result_type
,
operand
)
build_unary_op
(
enum
tree_code
op_code
,
tree
result_type
,
tree
operand
)
enum
tree_code
op_code
;
tree
result_type
;
tree
operand
;
{
{
tree
type
=
TREE_TYPE
(
operand
);
tree
type
=
TREE_TYPE
(
operand
);
tree
base_type
=
get_base_type
(
type
);
tree
base_type
=
get_base_type
(
type
);
...
@@ -1415,11 +1401,10 @@ build_unary_op (op_code, result_type, operand)
...
@@ -1415,11 +1401,10 @@ build_unary_op (op_code, result_type, operand)
/* Similar, but for COND_EXPR. */
/* Similar, but for COND_EXPR. */
tree
tree
build_cond_expr
(
result_type
,
condition_operand
,
true_operand
,
false_operand
)
build_cond_expr
(
tree
result_type
,
tree
result_type
;
tree
condition_operand
,
tree
condition_operand
;
tree
true_operand
,
tree
true_operand
;
tree
false_operand
)
tree
false_operand
;
{
{
tree
result
;
tree
result
;
int
addr_p
=
0
;
int
addr_p
=
0
;
...
@@ -1470,9 +1455,7 @@ build_cond_expr (result_type, condition_operand, true_operand, false_operand)
...
@@ -1470,9 +1455,7 @@ build_cond_expr (result_type, condition_operand, true_operand, false_operand)
the CALL_EXPR. */
the CALL_EXPR. */
tree
tree
build_call_1_expr
(
fundecl
,
arg
)
build_call_1_expr
(
tree
fundecl
,
tree
arg
)
tree
fundecl
;
tree
arg
;
{
{
tree
call
=
build
(
CALL_EXPR
,
TREE_TYPE
(
TREE_TYPE
(
fundecl
)),
tree
call
=
build
(
CALL_EXPR
,
TREE_TYPE
(
TREE_TYPE
(
fundecl
)),
build_unary_op
(
ADDR_EXPR
,
NULL_TREE
,
fundecl
),
build_unary_op
(
ADDR_EXPR
,
NULL_TREE
,
fundecl
),
...
@@ -1488,9 +1471,7 @@ build_call_1_expr (fundecl, arg)
...
@@ -1488,9 +1471,7 @@ build_call_1_expr (fundecl, arg)
the CALL_EXPR. */
the CALL_EXPR. */
tree
tree
build_call_2_expr
(
fundecl
,
arg1
,
arg2
)
build_call_2_expr
(
tree
fundecl
,
tree
arg1
,
tree
arg2
)
tree
fundecl
;
tree
arg1
,
arg2
;
{
{
tree
call
=
build
(
CALL_EXPR
,
TREE_TYPE
(
TREE_TYPE
(
fundecl
)),
tree
call
=
build
(
CALL_EXPR
,
TREE_TYPE
(
TREE_TYPE
(
fundecl
)),
build_unary_op
(
ADDR_EXPR
,
NULL_TREE
,
fundecl
),
build_unary_op
(
ADDR_EXPR
,
NULL_TREE
,
fundecl
),
...
@@ -1507,8 +1488,7 @@ build_call_2_expr (fundecl, arg1, arg2)
...
@@ -1507,8 +1488,7 @@ build_call_2_expr (fundecl, arg1, arg2)
/* Likewise to call FUNDECL with no arguments. */
/* Likewise to call FUNDECL with no arguments. */
tree
tree
build_call_0_expr
(
fundecl
)
build_call_0_expr
(
tree
fundecl
)
tree
fundecl
;
{
{
tree
call
=
build
(
CALL_EXPR
,
TREE_TYPE
(
TREE_TYPE
(
fundecl
)),
tree
call
=
build
(
CALL_EXPR
,
TREE_TYPE
(
TREE_TYPE
(
fundecl
)),
build_unary_op
(
ADDR_EXPR
,
NULL_TREE
,
fundecl
),
build_unary_op
(
ADDR_EXPR
,
NULL_TREE
,
fundecl
),
...
@@ -1523,8 +1503,7 @@ build_call_0_expr (fundecl)
...
@@ -1523,8 +1503,7 @@ build_call_0_expr (fundecl)
name, if requested. MSG says which exception function to call. */
name, if requested. MSG says which exception function to call. */
tree
tree
build_call_raise
(
msg
)
build_call_raise
(
int
msg
)
int
msg
;
{
{
tree
fndecl
=
gnat_raise_decls
[
msg
];
tree
fndecl
=
gnat_raise_decls
[
msg
];
const
char
*
str
=
discard_file_names
?
""
:
ref_filename
;
const
char
*
str
=
discard_file_names
?
""
:
ref_filename
;
...
@@ -1545,9 +1524,7 @@ build_call_raise (msg)
...
@@ -1545,9 +1524,7 @@ build_call_raise (msg)
/* Return a CONSTRUCTOR of TYPE whose list is LIST. */
/* Return a CONSTRUCTOR of TYPE whose list is LIST. */
tree
tree
gnat_build_constructor
(
type
,
list
)
gnat_build_constructor
(
tree
type
,
tree
list
)
tree
type
;
tree
list
;
{
{
tree
elmt
;
tree
elmt
;
int
allconstant
=
(
TREE_CODE
(
TYPE_SIZE
(
type
))
==
INTEGER_CST
);
int
allconstant
=
(
TREE_CODE
(
TYPE_SIZE
(
type
))
==
INTEGER_CST
);
...
@@ -1616,11 +1593,10 @@ gnat_build_constructor (type, list)
...
@@ -1616,11 +1593,10 @@ gnat_build_constructor (type, list)
actual record and know how to look for fields in variant parts. */
actual record and know how to look for fields in variant parts. */
static
tree
static
tree
build_simple_component_ref
(
record_variable
,
component
,
field
,
no_fold_p
)
build_simple_component_ref
(
tree
record_variable
,
tree
record_variable
;
tree
component
,
tree
component
;
tree
field
,
tree
field
;
int
no_fold_p
)
int
no_fold_p
;
{
{
tree
record_type
=
TYPE_MAIN_VARIANT
(
TREE_TYPE
(
record_variable
));
tree
record_type
=
TYPE_MAIN_VARIANT
(
TREE_TYPE
(
record_variable
));
tree
ref
;
tree
ref
;
...
@@ -1707,11 +1683,10 @@ build_simple_component_ref (record_variable, component, field, no_fold_p)
...
@@ -1707,11 +1683,10 @@ build_simple_component_ref (record_variable, component, field, no_fold_p)
reference could not be found. */
reference could not be found. */
tree
tree
build_component_ref
(
record_variable
,
component
,
field
,
no_fold_p
)
build_component_ref
(
tree
record_variable
,
tree
record_variable
;
tree
component
,
tree
component
;
tree
field
,
tree
field
;
int
no_fold_p
)
int
no_fold_p
;
{
{
tree
ref
=
build_simple_component_ref
(
record_variable
,
component
,
field
,
tree
ref
=
build_simple_component_ref
(
record_variable
,
component
,
field
,
no_fold_p
);
no_fold_p
);
...
@@ -1741,14 +1716,12 @@ build_component_ref (record_variable, component, field, no_fold_p)
...
@@ -1741,14 +1716,12 @@ build_component_ref (record_variable, component, field, no_fold_p)
object dynamically on the stack frame. */
object dynamically on the stack frame. */
tree
tree
build_call_alloc_dealloc
build_call_alloc_dealloc
(
tree
gnu_obj
,
(
gnu_obj
,
gnu_size
,
align
,
gnat_proc
,
gnat_pool
,
gnat_node
)
tree
gnu_size
,
tree
gnu_obj
;
int
align
,
tree
gnu_size
;
Entity_Id
gnat_proc
,
int
align
;
Entity_Id
gnat_pool
,
Entity_Id
gnat_proc
;
Node_Id
gnat_node
)
Entity_Id
gnat_pool
;
Node_Id
gnat_node
;
{
{
tree
gnu_align
=
size_int
(
align
/
BITS_PER_UNIT
);
tree
gnu_align
=
size_int
(
align
/
BITS_PER_UNIT
);
...
@@ -1865,13 +1838,12 @@ build_call_alloc_dealloc
...
@@ -1865,13 +1838,12 @@ build_call_alloc_dealloc
the storage pool to use. */
the storage pool to use. */
tree
tree
build_allocator
(
type
,
init
,
result_type
,
gnat_proc
,
gnat_pool
,
gnat_node
)
build_allocator
(
tree
type
,
tree
type
;
tree
init
,
tree
init
;
tree
result_type
,
tree
result_type
;
Entity_Id
gnat_proc
,
Entity_Id
gnat_proc
;
Entity_Id
gnat_pool
,
Entity_Id
gnat_pool
;
Node_Id
gnat_node
)
Node_Id
gnat_node
;
{
{
tree
size
=
TYPE_SIZE_UNIT
(
type
);
tree
size
=
TYPE_SIZE_UNIT
(
type
);
tree
result
;
tree
result
;
...
@@ -2030,9 +2002,7 @@ build_allocator (type, init, result_type, gnat_proc, gnat_pool, gnat_node)
...
@@ -2030,9 +2002,7 @@ build_allocator (type, init, result_type, gnat_proc, gnat_pool, gnat_node)
GNAT_FORMAL is how we find the descriptor record. */
GNAT_FORMAL is how we find the descriptor record. */
tree
tree
fill_vms_descriptor
(
expr
,
gnat_formal
)
fill_vms_descriptor
(
tree
expr
,
Entity_Id
gnat_formal
)
tree
expr
;
Entity_Id
gnat_formal
;
{
{
tree
record_type
=
TREE_TYPE
(
TREE_TYPE
(
get_gnu_tree
(
gnat_formal
)));
tree
record_type
=
TREE_TYPE
(
TREE_TYPE
(
get_gnu_tree
(
gnat_formal
)));
tree
field
;
tree
field
;
...
@@ -2059,8 +2029,7 @@ fill_vms_descriptor (expr, gnat_formal)
...
@@ -2059,8 +2029,7 @@ fill_vms_descriptor (expr, gnat_formal)
should not be allocated in a register. Returns true if successful. */
should not be allocated in a register. Returns true if successful. */
bool
bool
gnat_mark_addressable
(
expr_node
)
gnat_mark_addressable
(
tree
expr_node
)
tree
expr_node
;
{
{
while
(
1
)
while
(
1
)
switch
(
TREE_CODE
(
expr_node
))
switch
(
TREE_CODE
(
expr_node
))
...
...
gcc/value-prof.c
View file @
9373164a
...
@@ -314,7 +314,7 @@ find_values_to_profile (unsigned *n_values, struct histogram_value **values)
...
@@ -314,7 +314,7 @@ find_values_to_profile (unsigned *n_values, struct histogram_value **values)
we would have to be very careful here. */
we would have to be very careful here. */
bool
bool
value_profile_transformations
()
value_profile_transformations
(
void
)
{
{
rtx
insn
,
next
;
rtx
insn
,
next
;
int
changed
=
false
;
int
changed
=
false
;
...
...
gcc/web.c
View file @
9373164a
...
@@ -66,22 +66,18 @@ struct web_entry
...
@@ -66,22 +66,18 @@ struct web_entry
rtx
reg
;
rtx
reg
;
};
};
static
struct
web_entry
*
unionfind_root
PARAMS
((
struct
web_entry
*
));
static
struct
web_entry
*
unionfind_root
(
struct
web_entry
*
);
static
void
unionfind_union
PARAMS
((
struct
web_entry
*
,
static
void
unionfind_union
(
struct
web_entry
*
,
struct
web_entry
*
);
struct
web_entry
*
));
static
void
union_defs
(
struct
df
*
,
struct
ref
*
,
struct
web_entry
*
,
static
void
union_defs
PARAMS
((
struct
df
*
,
struct
ref
*
,
struct
web_entry
*
);
struct
web_entry
*
,
static
rtx
entry_register
(
struct
web_entry
*
,
struct
ref
*
,
char
*
,
char
*
);
struct
web_entry
*
));
static
void
replace_ref
(
struct
ref
*
,
rtx
);
static
rtx
entry_register
PARAMS
((
struct
web_entry
*
,
static
int
mark_addressof
(
rtx
*
,
void
*
);
struct
ref
*
,
char
*
,
char
*
));
static
void
replace_ref
PARAMS
((
struct
ref
*
,
rtx
));
static
int
mark_addressof
PARAMS
((
rtx
*
,
void
*
));
/* Find the root of unionfind tree (the representative of set). */
/* Find the root of unionfind tree (the representative of set). */
static
struct
web_entry
*
static
struct
web_entry
*
unionfind_root
(
element
)
unionfind_root
(
struct
web_entry
*
element
)
struct
web_entry
*
element
;
{
{
struct
web_entry
*
element1
=
element
,
*
element2
;
struct
web_entry
*
element1
=
element
,
*
element2
;
...
@@ -99,8 +95,7 @@ unionfind_root (element)
...
@@ -99,8 +95,7 @@ unionfind_root (element)
/* Union sets. */
/* Union sets. */
static
void
static
void
unionfind_union
(
first
,
second
)
unionfind_union
(
struct
web_entry
*
first
,
struct
web_entry
*
second
)
struct
web_entry
*
first
,
*
second
;
{
{
first
=
unionfind_root
(
first
);
first
=
unionfind_root
(
first
);
second
=
unionfind_root
(
second
);
second
=
unionfind_root
(
second
);
...
@@ -113,11 +108,8 @@ unionfind_union (first, second)
...
@@ -113,11 +108,8 @@ unionfind_union (first, second)
register, union them. */
register, union them. */
static
void
static
void
union_defs
(
df
,
use
,
def_entry
,
use_entry
)
union_defs
(
struct
df
*
df
,
struct
ref
*
use
,
struct
web_entry
*
def_entry
,
struct
df
*
df
;
struct
web_entry
*
use_entry
)
struct
ref
*
use
;
struct
web_entry
*
def_entry
;
struct
web_entry
*
use_entry
;
{
{
rtx
insn
=
DF_REF_INSN
(
use
);
rtx
insn
=
DF_REF_INSN
(
use
);
struct
df_link
*
link
=
DF_REF_CHAIN
(
use
);
struct
df_link
*
link
=
DF_REF_CHAIN
(
use
);
...
@@ -179,11 +171,8 @@ union_defs (df, use, def_entry, use_entry)
...
@@ -179,11 +171,8 @@ union_defs (df, use, def_entry, use_entry)
/* Find the corresponding register for the given entry. */
/* Find the corresponding register for the given entry. */
static
rtx
static
rtx
entry_register
(
entry
,
ref
,
used
,
use_addressof
)
entry_register
(
struct
web_entry
*
entry
,
struct
ref
*
ref
,
char
*
used
,
struct
web_entry
*
entry
;
char
*
use_addressof
)
struct
ref
*
ref
;
char
*
used
;
char
*
use_addressof
;
{
{
struct
web_entry
*
root
;
struct
web_entry
*
root
;
rtx
reg
,
newreg
;
rtx
reg
,
newreg
;
...
@@ -235,9 +224,7 @@ entry_register (entry, ref, used, use_addressof)
...
@@ -235,9 +224,7 @@ entry_register (entry, ref, used, use_addressof)
/* Replace the reference by REG. */
/* Replace the reference by REG. */
static
void
static
void
replace_ref
(
ref
,
reg
)
replace_ref
(
struct
ref
*
ref
,
rtx
reg
)
struct
ref
*
ref
;
rtx
reg
;
{
{
rtx
oldreg
=
DF_REF_REAL_REG
(
ref
);
rtx
oldreg
=
DF_REF_REAL_REG
(
ref
);
rtx
*
loc
=
DF_REF_REAL_LOC
(
ref
);
rtx
*
loc
=
DF_REF_REAL_LOC
(
ref
);
...
@@ -253,9 +240,7 @@ replace_ref (ref, reg)
...
@@ -253,9 +240,7 @@ replace_ref (ref, reg)
/* Mark each pseudo whose address is taken. */
/* Mark each pseudo whose address is taken. */
static
int
static
int
mark_addressof
(
rtl
,
data
)
mark_addressof
(
rtx
*
rtl
,
void
*
data
)
rtx
*
rtl
;
void
*
data
;
{
{
if
(
!*
rtl
)
if
(
!*
rtl
)
return
0
;
return
0
;
...
@@ -268,7 +253,7 @@ mark_addressof (rtl, data)
...
@@ -268,7 +253,7 @@ mark_addressof (rtl, data)
/* Main entry point. */
/* Main entry point. */
void
void
web_main
()
web_main
(
void
)
{
{
struct
df
*
df
;
struct
df
*
df
;
struct
web_entry
*
def_entry
;
struct
web_entry
*
def_entry
;
...
...
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