On Mon, 29 Oct 2007, Dan Hipschman wrote:
Compiling with -O2 -W -Wall using either gcc 4.0 or 3.4 I don't get
any warnings. Even adding -Wuninitialized doesn't do anything:
I am mostly using GCC 3.4 with -O2 -Wall as you did, and occasionally
a snapshot of GCC 4.3, with and without -Wextra in
On Sun, 28 Oct 2007, Dan Hipschman wrote:
The logic is as follows:
Thanks for the explanation, Dan!
Better than this would be to put assert(is_user_type(type)); above the
initializations to convince the programmer at least that name will get
initialized correctly in get_user_type. If that
On Sun, Oct 28, 2007 at 07:07:15PM -0700, Dan Kegel wrote:
To get uninitialized warnings, you have to also specify
optimization (-O2). Without -O, gcc doesn't
do the analysis that can detect uninitialized variables.
Compiling with -O2 -W -Wall using either gcc 4.0 or 3.4 I don't get
any
On Sun, Oct 28, 2007 at 01:51:34PM +0100, Gerald Pfeifer wrote:
In tools/widl/typegen.c we have the following snippet
static void write_user_tfs(FILE *file, type_t *type, unsigned int *tafsoff)
{
unsigned int start, absoff, flags;
unsigned int align = 0, ualign = 0;
const
On Mon, Oct 29, 2007 at 01:26:45AM +0100, Gerald Pfeifer wrote:
I think the question is whether a compiler can reasonably be expected
to deduce that the source is fine. If that deduction involves solving
the halting problem (or similar) hacking the source to avoid the warning
actually doesn't
Dan H. wrote:
If you tell me what options you build with and I can reproduce the
warning then I'll be more than happy to try to fix it. I build widl
with -W -Wall and get two warnings.
To get uninitialized warnings, you have to also specify
optimization (-O2). Without -O, gcc doesn't
do the