[Bug 226826] New: gcj: wrong error message
https://bugzilla.novell.com/show_bug.cgi?id=226826 Summary: gcj: wrong error message Product: openSUSE 10.2 Version: RC 5 Platform: x86 OS/Version: Linux Status: NEW Severity: Normal Priority: P5 - None Component: Development AssignedTo: pth@novell.com ReportedBy: jengelh@gmx.de QAContact: qa@suse.de GCJ produces a wrong error message when implicitly downgrading case labels: $ gcj test.java --main=test -o test test.java: In class 'test': test.java: In method 'test.main(java.lang.String[])': test.java:6: error: Incompatible type for case. Can't convert ‘int’ to ‘int’. case 131072: ^ 1 error Sun Java does it right: $ javac test.java test.java:6: possible loss of precision found : int required: short case 131072: ^ 1 error (Convert "int" to "int" is wrong -- should be "int" to "short") -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=226826 ------- Comment #1 from jengelh@gmx.de 2006-12-07 11:02 MST ------- Created an attachment (id=108739) --> (https://bugzilla.novell.com/attachment.cgi?id=108739&action=view) testcase -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=226826 ------- Comment #2 from jengelh@gmx.de 2006-12-07 11:04 MST ------- RPM tells us: gcc-java-4.1.3-29, on OpenSUSE 10.2/factory. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=226826 ------- Comment #3 from jengelh@gmx.de 2006-12-07 11:05 MST ------- Sorry for yet another comment - the version numbers are real strange (4.1.3, 4.1.2?) in 10.2: $ rpm -qa "gcc*" | sort gcc-4.1.3-29 gcc-c++-4.1.3-29 gcc-gij-4.1.3-29 gcc-java-4.1.3-29 gcc41-4.1.2_20061115-5 gcc41-c++-4.1.2_20061115-5 gcc41-gij-4.1.2_20061115-7 gcc41-java-4.1.2_20061115-5 -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=226826 pth@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|pth@novell.com |matz@novell.com -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=226826 ------- Comment #4 from rguenther@novell.com 2007-01-19 05:06 MST ------- This should fix it: Index: java/parse.y =================================================================== *** java/parse.y (revision 120930) --- java/parse.y (working copy) *************** java_complete_lhs (tree node) *** 11873,11880 **** EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); parse_error_context (wfl_operator, ! "Incompatible type for case. Can't convert %qs to %<int%>", ! lang_printable_name (TREE_TYPE (cn), 0)); return error_mark_node; } --- 11873,11881 ---- EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); parse_error_context (wfl_operator, ! "Incompatible type for case. Can't convert %qs to %qs", ! lang_printable_name (TREE_TYPE (cn), 0), ! lang_printable_name (TREE_TYPE (TREE_OPERAND (nn, 0)), 0)); return error_mark_node; } -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=226826 matz@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|matz@novell.com |rguenther@novell.com ------- Comment #5 from matz@novell.com 2007-01-23 09:25 MST ------- I suggest to only apply this upstream, and not bother to update the openSuSE 10.2 compiler for this as it's only a cosmetic problem. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=226826 ------- Comment #6 from jengelh@gmx.de 2007-01-23 11:25 MST ------- that will be sufficient -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=226826 rguenther@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX ------- Comment #7 from rguenther@novell.com 2007-01-25 05:25 MST ------- The java (source) frontend is gone upstream (it's replaced by the Eclipse java frontend). -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=226826 Jan Engelhardt <jengelh@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED -- 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.
participants (1)
-
bugzilla_noreply@novell.com