http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48850

--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> 2011-05-03 10:45:43 UTC ---
Remarks:

* This is clearly a bug; the diagnostics given are simply wrong.

* It's not a conformance bug, as C99 permits a limit on object size as 
small as 64KiB (in a hosted environment) (and the apparent limit here - 
see <http://gcc.gnu.org/ml/gcc-patches/2011-05/msg00096.html> - is 1EiB).

* If it's hard to support such large objects for some reason, a call to 
sorry () is the appropriate way to diagnose the lack of support instead of 
incorrect overflow diagnostics.  There would still be a bug, since GNU 
programs should avoid arbitrary limits (meaning anything smaller than that 
imposed by the target instruction set, C semantics, ABI etc.), but a less 
serious one (GCC is full of inappropriate arbitrary limits, such as 2GB 
for a string constant, but the only ones people seem to encounter in 
practice are those from stack overflow).

Reply via email to