This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Storage for uninitialized objects (PR 24626)


Gabriel Dos Reis wrote:

Robert,

Recently you have expressed the opinion that sounds to me that GCC is
taking too much a cavalier approach to "undefined behaviour".
However, as long as you feed that line of thought with reasoning like
above, I don't see how the current trend will change. Or did you
express that opinion just as a matter of debate?


These things definitely have to be addressed on a case by
case basis. I know that Paul likes
to consider them all together, but I don't think that's helpful.

In the case of uninitialized variables, I really think that it is
appropriate in the default optimized mode to assume that
all variables are initialized.

In this case, it is easy to formulate a useful option to
initialized everything by default, so you can check/run
your code in that mode if you want.

-- Gaby





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]