OSDN Git Service

* c-typeck.c (build_c_cast): Add OPT_Wcast_qual to warnings.
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 11 Aug 2007 13:32:52 +0000 (13:32 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 11 Aug 2007 13:32:52 +0000 (13:32 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127357 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-typeck.c

index bc72017..d949292 100644 (file)
@@ -1,3 +1,7 @@
+2007-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * c-typeck.c (build_c_cast): Add OPT_Wcast_qual to warnings.
+
 2007-08-10  Adam Nemet  <anemet@caviumnetworks.com>
 
        * config/mips/predicates.md (const_call_insn_operand): Invoke
index 7e6da0f..516314e 100644 (file)
@@ -3557,12 +3557,12 @@ build_c_cast (tree type, tree expr)
                 && TREE_CODE (in_otype) == POINTER_TYPE);
 
          if (added)
-           warning (0, "cast adds new qualifiers to function type");
+           warning (OPT_Wcast_qual, "cast adds new qualifiers to function type");
 
          if (discarded)
            /* There are qualifiers present in IN_OTYPE that are not
               present in IN_TYPE.  */
-           warning (0, "cast discards qualifiers from pointer target type");
+           warning (OPT_Wcast_qual, "cast discards qualifiers from pointer target type");
        }
 
       /* Warn about possible alignment problems.  */