From: Eric Botcazou Date: Fri, 23 May 2008 10:36:37 +0000 (+0000) Subject: utils.c (handle_type_generic_attribute): Adjust to accept fixed arguments before... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3fda325236b11bff7210616f03247012d393a95f;p=gcc.git utils.c (handle_type_generic_attribute): Adjust to accept fixed arguments before an elipsis. * utils.c (handle_type_generic_attribute): Adjust to accept fixed arguments before an elipsis. From-SVN: r135797 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b752aefad40..4ba53acc06f 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2008-05-23 Eric Botcazou + + * utils.c (handle_type_generic_attribute): Adjust to accept + fixed arguments before an elipsis. + 2008-05-21 Thomas Quinot * g-sothco.ads, g-sothco.adb: New files. diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index b4b38941ddb..7a984b23ad5 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -4712,8 +4712,17 @@ handle_type_generic_attribute (tree *node, tree ARG_UNUSED (name), tree ARG_UNUSED (args), int ARG_UNUSED (flags), bool * ARG_UNUSED (no_add_attrs)) { - /* Ensure we have a function type, with no arguments. */ - gcc_assert (TREE_CODE (*node) == FUNCTION_TYPE && ! TYPE_ARG_TYPES (*node)); + tree params; + + /* Ensure we have a function type. */ + gcc_assert (TREE_CODE (*node) == FUNCTION_TYPE); + + params = TYPE_ARG_TYPES (*node); + while (params && ! VOID_TYPE_P (TREE_VALUE (params))) + params = TREE_CHAIN (params); + + /* Ensure we have a variadic function. */ + gcc_assert (!params); return NULL_TREE; }