aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2020-03-03 17:57:51 +0000
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-19 04:17:29 -0400
commitc95f808ddd5046573423c9d1ee148645e5340738 (patch)
treea99db98e03a04564121575672e8da9a91648c849 /gcc/ada/gcc-interface/utils.c
parent906a759dcbedb3e56d61824cb7981ea395ca1f07 (diff)
downloadgcc-c95f808ddd5046573423c9d1ee148645e5340738.zip
gcc-c95f808ddd5046573423c9d1ee148645e5340738.tar.gz
gcc-c95f808ddd5046573423c9d1ee148645e5340738.tar.bz2
[Ada] AI12-0028-1 Import of variadic C functions
2020-06-19 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * gcc-interface/decl.c (gnat_to_gnu_param): Tidy up. (gnat_to_gnu_subprog_type): For a variadic C function, do not build unnamed parameters and do not add final void node. * gcc-interface/misc.c: Include snames.h. * gcc-interface/trans.c (Attribute_to_gnu): Tidy up. (Call_to_gnu): Implement support for unnamed parameters in a variadic C function. * gcc-interface/utils.c: Include snames.h. (copy_type): Tidy up.
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r--gcc/ada/gcc-interface/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index fb08b6c..2a6ed04 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -50,6 +50,7 @@
#include "types.h"
#include "atree.h"
#include "nlists.h"
+#include "snames.h"
#include "uintp.h"
#include "fe.h"
#include "sinfo.h"
@@ -2561,7 +2562,7 @@ copy_type (tree type)
}
/* And the contents of the language-specific slot if needed. */
- if ((INTEGRAL_TYPE_P (type) || TREE_CODE (type) == REAL_TYPE)
+ if ((INTEGRAL_TYPE_P (type) || SCALAR_FLOAT_TYPE_P (type))
&& TYPE_RM_VALUES (type))
{
TYPE_RM_VALUES (new_type) = NULL_TREE;