https://bugzilla.novell.com/show_bug.cgi?id=230189 Summary: gcc shouldn't warn when testing two distinct string literals for equality Product: openSUSE 10.3 Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Minor Priority: P5 - None Component: Development AssignedTo: rguenther@novell.com ReportedBy: mmarek@novell.com QAContact: qa@suse.de $ cat cmp.c int f1(void) { return "string1" == "string2"; } int f2(void) { return "string3" != "string4"; } $ gcc -c -Wall cmp.c cmp.c: In function ‘f1’: cmp.c:3: warning: comparison with string literal cmp.c: In function ‘f2’: cmp.c:8: warning: comparison with string literal $ Not that code like this would fall into the category "good programming practice", but the expressions will work nevertheless. -- 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, or are watching someone who is.