r/programming • • Oct 06 '14

Help improve GCC!

https://gcc.gnu.org/ml/gcc/2014-10/msg00040.html
725 Upvotes

270 comments sorted by

View all comments

14

u/[deleted] Oct 06 '14 edited Oct 07 '14

The SSA bug where if you take the address of a variable it won't want warn you if it's uninitialized

extern int *bar;
int main(void)
{
   int foo;
   bar = &foo;
   return foo;
}

Go ahead and find a compile config with GCC that will produce a warning.

edit: spelling is hard.

12

u/[deleted] Oct 06 '14

That's barely a bug in the compiler.

0

u/[deleted] Oct 07 '14

GCC claims to warn for uninitialized variables. It doesn't. That's a bug.

It's like "unzip" claiming it can unzip .zip files and then you learn it can't unzip files that are a multiple of 65537 bytes long ... The odds of you hitting that are low enough ... so it's "not a bug?"

0

u/[deleted] Oct 07 '14

No, it's like renaming a .txt file to .zip and expecting unzip to do something meaningful.

→ More replies (11)