diff options
author | Andrew Haley <aph@redhat.com> | 2001-03-06 14:56:04 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2001-03-06 14:56:04 +0000 |
commit | 4eaf1d5b766503ce6338677e0c365c44b125b9aa (patch) | |
tree | a4fd0b2b995b9ab9c81657d3f3f1850524574bd1 | |
parent | 68527d81dce0278f1758bd98b40ab1ab36f5103b (diff) | |
download | gcc-4eaf1d5b766503ce6338677e0c365c44b125b9aa.zip gcc-4eaf1d5b766503ce6338677e0c365c44b125b9aa.tar.gz gcc-4eaf1d5b766503ce6338677e0c365c44b125b9aa.tar.bz2 |
typeck.c (convert_arguments): Don't do ellipsis conversion for __built_in_constant_p.
2001-03-05 Andrew Haley <aph@redhat.com>
* typeck.c (convert_arguments): Don't do ellipsis conversion for
__built_in_constant_p.
From-SVN: r40263
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 13 |
2 files changed, 15 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 389b9fc..04671bd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2001-03-05 Andrew Haley <aph@redhat.com> + + * typeck.c (convert_arguments): Don't do ellipsis conversion for + __built_in_constant_p. + 2001-03-02 Nathan Sidwell <nathan@codesourcery.com> * typeck.c (build_static_cast): Allow enum to enum conversions diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 8b87342..d572182 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -3207,9 +3207,16 @@ convert_arguments (typelist, values, fndecl, flags) if (TREE_CODE (TREE_TYPE (val)) == REFERENCE_TYPE) val = convert_from_reference (val); - result = tree_cons (NULL_TREE, - convert_arg_to_ellipsis (val), - result); + if (DECL_BUILT_IN (fndecl) + && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CONSTANT_P) + /* Don't do ellipsis conversion for __built_in_constant_p + as this will result in spurious warnings for non-POD + types. */ + val = require_complete_type (val); + else + val = convert_arg_to_ellipsis (val); + + result = tree_cons (NULL_TREE, val, result); } if (typetail) |