OSDN Git Service

* typeck.c (dubious_conversion_warnings): Look through
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Mar 2000 15:45:11 +0000 (15:45 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Mar 2000 15:45:11 +0000 (15:45 +0000)
REFERENCE_TYPE.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32360 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/typeck.c

index fc8a968..05c2158 100644 (file)
@@ -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.
index 219ca39..135378d 100644 (file)
@@ -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)
     {