[cfe-dev] Unneeded declarations invalidation

Eli Friedman eli.friedman at gmail.com
Tue Jul 21 14:34:37 PDT 2009

On Tue, Jul 21, 2009 at 1:11 PM, Daniel Dunbar<daniel at zuster.org> wrote:
> How hard would it be for us to actually support this extension in Sema?

Hmm... to support it properly, we'd have to add flags to structures to
note that they're variable length or variably modified, make sure to
mark structs and arrays containing such structs as variable
length/variably modified as appropriate, avoid trying to compute
anything that requires the layout for such structures in Evaluate,
adjust isICE to perform checks as appropriate, disallow initializers
for such structures, adjust isVariablyModifiedType, disallow
variable-size structs with static storage duration, disallow
redeclaring a tag with a variably modified type, disallow
variable-size structs in function parameters/return values, adjust
various places in ObjC code to disallow them, and adjust the goto
verifier to look for RecordDecls.  There's probably some stuff I'm
forgetting, but that's everything I can think of off the top of my


More information about the cfe-dev mailing list