[Bug c/38945] New: No warning when using unset variable

2009-01-23 Thread fredrik at hederstierna dot com
The 4.x compilers does not warn when using unset variables.
The 3.x compilers did warn on this:

Example:

int use_unset_variable(int y)
{
  int x;
  switch(y) {
  case 0:
x = 0;
break;
  default:
break;
  }
  x++;
  return x;
}

Variable x could be unset when returning.
I use all warnings possible:

-Wall -W -Wextra

Best Regards
Fredrik


-- 
   Summary: No warning when using unset variable
   Product: gcc
   Version: 4.3.2
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fredrik at hederstierna dot com
 GCC build triplet: arm-elf-gcc
  GCC host triplet: x86-intel
GCC target triplet: arm-elf-gcc


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



[Bug c/23870] New: continue hangs compiler (and whole computer!)

2005-09-13 Thread fredrik at hederstierna dot com
When I try to compile any of these functions below, GCC 3.4.4 hangs the whole
computer! I was needed to reboot my Feodore Core3 system - severe memory leak?

I'm compiling on a Linux machine running Feodore Core3 kernel 2.6.9.
The compiler is arm-elf-gcc-3.4.4 compiled with binutils-2.16.1, newlib-1.13.0.

I compiled binutils like this:
../../$BINUTILS_DIR/configure --target=$TARGET --prefix=$DEST 
--disable-nls
make LDFLAGS=-s all install

I compiled GCC like this:
../../$GCC_DIR/configure --enable-languages=c,c++,f77 --target=$TARGET
--prefix=$DEST --with-gnu-as --with-gnu-ld --with-newlib --disable-nls
make LDFLAGS=-s all-gcc all-target-libstdc++-v3 install-gcc
install-target-libstdc++-v3

The code that hangs the compiler looks like this:
(Simplified stupid code example just to show the error.)

void hang_compiler1(signed long long x)
{
  while (1) {
if (x  0)
  continue;
  }
}

void hang_compiler2(signed long long x)
{
  for (;;) {
if (x  0)
  continue;
  }
}

void hang_compiler3(signed long long x)
{
  do {
if (x  0)
  continue;
  } while (1);
}

-- 
   Summary: continue hangs compiler (and whole computer!)
   Product: gcc
   Version: 3.4.4
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fredrik at hederstierna dot com
CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: Linux Fedora Core3 kernel 2.6.9
GCC target triplet: arm-elf


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


[Bug other/23870] continue hangs compiler (and whole computer!)

2005-09-13 Thread fredrik at hederstierna dot com

--- Additional Comments From fredrik at hederstierna dot com  2005-09-13 
20:08 ---
This bug only shows when you compile with -O3


-- 


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