> -----Original Message----- > From: Jason Merrill [mailto:ja...@redhat.com] > Sent: Monday, August 19, 2013 2:23 PM > To: Iyer, Balaji V; Rainer Orth > Cc: Jakub Jelinek; gcc-patches@gcc.gnu.org; Marek Polacek > (pola...@redhat.com) > Subject: Re: [PATCH] Fix for PR c/57490 > > On 08/19/2013 12:40 PM, Iyer, Balaji V wrote: > > + /* If it is a built-in array notation function, then the return type of > > + the function is the element type of the array passed in as array > > + notation (i.e. the first parameter of the function). */ if > > + (flag_enable_cilkplus && TREE_CODE (fn) == CALL_EXPR) > ... > > Let's move this a bit higher in the function, to... > > > /* Check that arguments to builtin functions match the expectations. */ > > if (fndecl > > && DECL_BUILT_IN (fndecl) > > && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL > > && !check_builtin_function_arguments (fndecl, nargs, argarray)) > > return error_mark_node; > > ...here. >
I made the change. > > /* Some built-in function calls will be evaluated at compile-time in > > fold (). Set optimize to 1 when folding __builtin_constant_p inside > > a constexpr function so that fold_builtin_1 doesn't fold it to 0. > > */ > > OK with that change. > and committed the Change to trunk (SVN revision: r201867). Thanks, Balaji V. Iyer. > Jason