Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 4
    \$\begingroup\$ @Thomas Yes it is a stack overflow on any machine where local variables are allocated on the stack. Since the C language has no concept of a stack overflow indication (it's all undefined behavior; one of them manifests itself as a segfault), this does fit the original requirement. \$\endgroup\$ Commented Feb 2, 2014 at 17:45
  • \$\begingroup\$ OK, sorry, accepted. \$\endgroup\$ Commented Feb 2, 2014 at 17:49
  • 3
    \$\begingroup\$ it gives main.c:1:16: error: size of array 'i' is negative for me on gcc 4.8.1. The unsigned version main(){int i[~0U];} works. \$\endgroup\$ Commented Feb 25, 2014 at 16:00
  • \$\begingroup\$ Doesn't work for me after I manually configured a 4GB stack. \$\endgroup\$ Commented Oct 6, 2015 at 12:58
  • 1
    \$\begingroup\$ Nothing accesses the array, so it is not generated and no error. At least initializing or using it is necessary to error. \$\endgroup\$ Commented Nov 21, 2016 at 16:33