aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2000-03-06 15:45:11 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2000-03-06 15:45:11 +0000
commit55df01757befb0bab04b9a36a644b4a6ce0e98e2 (patch)
tree291d5f30ede5513c9d31eb7dd32876c1a8f7747e /gcc
parentefd3d4a6637aa02d4cd490523d77e47c0ec60146 (diff)
downloadgcc-55df01757befb0bab04b9a36a644b4a6ce0e98e2.zip
gcc-55df01757befb0bab04b9a36a644b4a6ce0e98e2.tar.gz
gcc-55df01757befb0bab04b9a36a644b4a6ce0e98e2.tar.bz2
typeck.c (dubious_conversion_warnings): Look through REFERENCE_TYPE.
* typeck.c (dubious_conversion_warnings): Look through REFERENCE_TYPE. From-SVN: r32360
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/typeck.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index fc8a968..05c2158 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
+
+ * typeck.c (dubious_conversion_warnings): Look through
+ REFERENCE_TYPE.
+
Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* lang-specs.h (as): Don't call if -syntax-only.
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 219ca39..135378d 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)
{