[Bug c/21664] New: array-of-empty-structure extension not properly defined

2005-05-19 Thread rguenth at gcc dot gnu dot org
For struct {} a[4]; int main() { return a[2] - a[1]; } the C frontend emits return 0 /[ex] 0; which will, at -O0 fault at runtime, at -O not due to RTL CSE. Is this even well-defined? Should the C-frontend rather emit return 0; ? Of course this contradicts the C standard, but that does

Re: [Bug c/21664] New: array-of-empty-structure extension not properly defined

2005-05-19 Thread Gabriel Dos Reis
rguenth at gcc dot gnu dot org [EMAIL PROTECTED] writes: | For | | struct {} a[4]; int main() { return a[2] - a[1]; } | | the C frontend emits | | return 0 /[ex] 0; | | which will, at -O0 fault at runtime, at -O not due to RTL CSE. | | Is this even well-defined? No, as you noted below. |