On 10/25/10 11:00, Paolo Bonzini wrote:
> I can take a look at the code, it is definitely safe with GCC 4 and
> -fno-tree-ter.
Thanks. The idea would be that, if we can check at configure-time
or compile-time whether it's safe, then we could fall back on
alloca rather than malloc.
While we're looking into GCC, what I'd like is the ability to say
something like this:
(char [100]) { ? }
meaning, I want a 100-byte buffer that is uninitialized. Here, the
"?" is an extension to the initializer syntax which means that the
object has an unspecified value, much as "char x[100];" declares
a local variable X with an unspecified value. I don't care what
syntax to use, so if it's better to use a new __builtin_unspecified
gizmo than to use ?, that's fine.
The advantage of this is that GCC would no longer have to initialize
the buffer to zero. This initialization is entirely a waste of time
in the proposed inttostr change.
Would it be reasonable to propose something like this for GCC?