Comment

Comment by _sbrk

gcc will not let you actually define a negatively-sized array. Check it with some simple code -- I did. Even with -Wall -Wextra -O1 -std=c11 -Wpedantic, if I actually try to create foo[-1], on the stack or in BSS, I get the proper error: error: size of array 'foo' is negative
parent _sbrk 1 year ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton