Jonathan Wakely schrieb:
On 17 September 2011 21:32, Georg-Johann Lay wrote:
Hi, compiled with -Wall -Wextra the wollowing lines don't complain about a
being used uninitialized. Tried with 4.5 and 4.6. Am I missing something?
int func (void)
{
int a = a;
return a;
}
Yes, you're missing -Winit-self
Thanks.
Confusing... extra option for that?
The message with -Wuninitialized -Winit-self is
warning: 'a' is used uninitialized in this function [-Wuninitialized]
Is there a special reason why this is not part of Wall or Wextra?