From: Nathan Sidwell Date: Mon, 6 Mar 2000 15:45:11 +0000 (+0000) Subject: typeck.c (dubious_conversion_warnings): Look through REFERENCE_TYPE. X-Git-Tag: prereleases/libstdc++-2.92~7849 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=55df01757befb0bab04b9a36a644b4a6ce0e98e2;p=thirdparty%2Fgcc.git typeck.c (dubious_conversion_warnings): Look through REFERENCE_TYPE. * typeck.c (dubious_conversion_warnings): Look through REFERENCE_TYPE. From-SVN: r32360 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fc8a968daaf1..05c2158836af 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2000-03-06 Nathan Sidwell + + * typeck.c (dubious_conversion_warnings): Look through + REFERENCE_TYPE. + Mon Mar 6 08:46:47 2000 Richard Kenner * lang-specs.h (as): Don't call if -syntax-only. diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 219ca3984f3e..135378d4a34d 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -6433,6 +6433,9 @@ dubious_conversion_warnings (type, expr, errtype, fndecl, parmnum) tree fndecl; int parmnum; { + if (TREE_CODE (type) == REFERENCE_TYPE) + type = TREE_TYPE (type); + /* Issue warnings about peculiar, but legal, uses of NULL. */ if (ARITHMETIC_TYPE_P (type) && expr == null_node) {