c - Making "warning: array 'foo' assumed to have one element" an error -


i accidentally declared array without length writing enum foo bar[];, , gcc gave me warning "array 'bar' assumed have 1 element".

is there way make gcc turn error, instead of warning me , assuming meant enum foo bar[1]? can't think of circumstances under i'd purposely leave out array's length.

http://gcc.gnu.org/onlinedocs/gcc/warning-options.html

you can use -werror turn warnings errors. couldn't find option turn 1 error.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -