Hi All,
http://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#C-Dialect-Options
Is there an option to initialize variables to known values in a C/C++ program?
My use case is 'debug' builds and finding use of uninitialized values
that get lucky by being 0 most of the time. For example:
void D
On 18/02/13 11:40, Jeffrey Walton wrote:
Hi All,
http://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#C-Dialect-Options
Is there an option to initialize variables to known values in a C/C++ program?
My use case is 'debug' builds and finding use of uninitialized values
that get lucky by bei
On 02/18/2013 02:02 PM, Alec Teal wrote:
On 18/02/13 11:40, Jeffrey Walton wrote:
Hi All,
http://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#C-Dialect-Options
Is there an option to initialize variables to known values in a C/C++
program?
My use case is 'debug' builds and finding us
Gerald Pfeifer wrote, On Monday 18 February 2013 02:17 AM:
On Thu, 24 Jan 2013, Richard Biener wrote:
There are technical details of the maintaining part - like would the
material reside in SVN? Or in the CVS where we keep our webpages? Or
somewhere else public (github?)? Would we want to ha
On Mon, Feb 18, 2013 at 7:42 AM, Michael Veksler
wrote:
> On 02/18/2013 02:02 PM, Alec Teal wrote:
>>
>> On 18/02/13 11:40, Jeffrey Walton wrote:
>>>
>>> Hi All,
>>>
>>>
>>> http://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#C-Dialect-Options
>>>
>>> Is there an option to initialize variable
On 02/18/2013 03:28 PM, Jeffrey Walton wrote:
On Mon, Feb 18, 2013 at 7:42 AM, Michael Veksler
wrote:
On 02/18/2013 02:02 PM, Alec Teal wrote:
On 18/02/13 11:40, Jeffrey Walton wrote:
Hi All,
http://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#C-Dialect-Options
Is there an option to i
On 18 February 2013 13:28, Jeffrey Walton wrote:
> The reason I went looking for the flag is someone asked about a crash
> on the OpenSSL mailing list. I knew it was due to an uninitialized
> field (but they did not realize the value was not initialized). I
> wanted to suggest a quick way to find w
On Mon, Feb 18, 2013 at 9:43 AM, Jonathan Wakely wrote:
> On 18 February 2013 13:28, Jeffrey Walton wrote:
>> The reason I went looking for the flag is someone asked about a crash
>> on the OpenSSL mailing list. I knew it was due to an uninitialized
>> field (but they did not realize the value was
On 02/18/2013 03:07 PM, Jeffrey Walton wrote:
> On Mon, Feb 18, 2013 at 9:43 AM, Jonathan Wakely
> wrote:
>> On 18 February 2013 13:28, Jeffrey Walton wrote:
>>> What if the ".BSS" section was
>>> initialized to 0xFF rather than a page full of NULLs?
>>
>> That could break millions of perfectly
On Mon, Feb 18, 2013 at 10:34 AM, Andrew Haley wrote:
> On 02/18/2013 03:07 PM, Jeffrey Walton wrote:
>> On Mon, Feb 18, 2013 at 9:43 AM, Jonathan Wakely
>> wrote:
>>> On 18 February 2013 13:28, Jeffrey Walton wrote:
>
What if the ".BSS" section was
initialized to 0xFF rather than a pa
On Monday 18 February 2013 09:44 PM, Jeffrey Walton wrote:
On Mon, Feb 18, 2013 at 10:34 AM, Andrew Haley wrote:
On 02/18/2013 03:07 PM, Jeffrey Walton wrote:
On Mon, Feb 18, 2013 at 9:43 AM, Jonathan Wakely wrote:
On 18 February 2013 13:28, Jeffrey Walton wrote:
What if the ".BSS" sect
Hi,
On Mon, 18 Feb 2013, Jeffrey Walton wrote:
> On Mon, Feb 18, 2013 at 10:34 AM, Andrew Haley wrote:
> > On 02/18/2013 03:07 PM, Jeffrey Walton wrote:
> >> On Mon, Feb 18, 2013 at 9:43 AM, Jonathan Wakely
> >> wrote:
> >>> On 18 February 2013 13:28, Jeffrey Walton wrote:
> >
> What if t
On Mon, 18 Feb 2013, Michael Matz wrote:
> Automatic variables, as they are on the stack, are unlikely to usually get
> the value 0 out of pure luck, so an option to initialize them to 0xDEADBEAF
> doesn't make much sense.
Hm, but the following comment from init-regs.c indicates that GCC will set
Forgive me, but I don't see where anything is guaranteed to be zero'd
before use. I'm likely wrong somewhere since you disagree.
http://en.wikipedia.org/wiki/.bss
This is about what happens to work, and specifically notes that it is
not part of the C standard. There is a big difference betwe
Wrong. It specifies that objects with static storage duration that
aren't explicitely initialized are initialized with null pointers, or
zeros depending on type. 6.7.8.10.
OK, that means that the comments of my last mesage don't apply to
variables of this type. So they should at least option
Jan Hubicka ucw.cz> writes:
> >
> > How does the C++ frontend handle this?
>
> See logic in cgraph_function_body_availability. When function is weak (that is
effect
> of make_decl_one_only) it will be inlinable only if it is declared inline.
This happens
> to be the case of C++ weaks because o
16 matches
Mail list logo