[Bug 654864] New: gcc [gcc-4_5-branch revision 160292] gives no warning of an undeclared and used variable
https://bugzilla.novell.com/show_bug.cgi?id=654864 https://bugzilla.novell.com/show_bug.cgi?id=654864#c0 Summary: gcc [gcc-4_5-branch revision 160292] gives no warning of an undeclared and used variable Classification: openSUSE Product: openSUSE 11.3 Version: Final Platform: x86-64 OS/Version: openSUSE 11.3 Status: NEW Severity: Normal Priority: P5 - None Component: Development AssignedTo: pth@novell.com ReportedBy: hans-juergen.greif@kabelbw.de QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.12) Gecko/20101026 SUSE/3.6.12-0.7.1 Firefox/3.6.12 Hello, In a simple void function I used a variable h, I haven't declared before, and gcc(cc) gives no warning at compile time. The operation for example h = sqrt(2); does not work at runtime. In general it's hard to debug. The cc should test if a variable is declared or not. Regards, grepi Reproducible: Always Steps to Reproduce: 1.h = sqrt(2); without declaration of h 2.h = sqrt(2); without declaration of h 3.h = sqrt(2); without declaration of h Actual Results: no compiler warning/error on not declared and used variables Expected Results: compiler warning/error on not declared and used variables -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=654864
https://bugzilla.novell.com/show_bug.cgi?id=654864#c1
Philipp Thomas
https://bugzilla.novell.com/show_bug.cgi?id=654864
https://bugzilla.novell.com/show_bug.cgi?id=654864#c2
Philipp Thomas
participants (1)
-
bugzilla_noreply@novell.com