Bug 48504

Summary: Add Variable Length Array (VLA) support for -fstack-protector(-all)
Product: gcc Reporter: joe.bassis
Component: middle-endAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED WORKSFORME    
Severity: enhancement    
Priority: P3    
Version: unknown   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:

Description joe.bassis 2011-04-07 19:40:19 UTC
Currently, -fstack-protector(-all) is only available for normal arrays. Please add support for VLAs as well.

Currently:
char str[13] = "Hello World!";

Wishlist:
char str[variablelength];
Comment 1 Andrew Pinski 2024-02-16 05:33:39 UTC
-fstack-protector has worked for VLA since at least GCC 4.1.2 (which was released in 2007). So closing as works for me.