[Bug c/52534] gcc doesn't detect incorrect expression in call to va_start

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 15 09:49:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52534

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-03-15 09:41:38 UTC ---
      /* Strip off all nops for the sake of the comparison.  This
         is not quite the same as STRIP_NOPS.  It does more.
         We must also strip off INDIRECT_EXPR for C++ reference
         parameters.  */
      while (CONVERT_EXPR_P (arg)
             || TREE_CODE (arg) == INDIRECT_REF)
        arg = TREE_OPERAND (arg, 0);


Why are we stripping off the NOPS here.  This is in fold_builtin_next_arg
(builtins.c).



More information about the Gcc-bugs mailing list