[cfe-dev] Can't use sizeof ( typeof ( <vla> ))

Friedman, Eli via cfe-dev cfe-dev at lists.llvm.org
Thu Nov 17 10:00:39 PST 2016


On 11/17/2016 7:02 AM, Paulo Matos via cfe-dev wrote:
> The problem with this rationale is that it's not true in this case since
> you need to evaluate typeof (a), which can't be evaluated at compile
> time. Is it true that to fix this issue, we need to rethink how sizeof
> are evaluated?

sizeof() and typeof() with an operand of VLA type are already 
special-cased; see Sema::TransformToPotentiallyEvaluated.

-Eli

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project




More information about the cfe-dev mailing list