Issue 71226 - Warnings: GNU/Linux SPARC cppcanvas
Summary: Warnings: GNU/Linux SPARC cppcanvas
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: OOo 2.0.4
Hardware: Sun Linux, all
: P3 Trivial (vote)
Target Milestone: OOo 2.2
Assignee: Stephan Bergmann
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks: 67001
  Show dependency tree
 
Reported: 2006-11-06 04:04 UTC by sparcmoz
Modified: 2006-12-05 09:14 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
allow gcc4.1.2 warnings are errors (715 bytes, patch)
2006-11-06 04:15 UTC, sparcmoz
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description sparcmoz 2006-11-06 04:04:32 UTC
A workaround exists in cppcanvas/source/mtfrenderer/textaction.cxx for a bogus
warning with gcc4.1.1 but I am using gcc4.1.2 - patch attached.

-#if __GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 1
+#if __GNUC__ == 4 && __GNUC_MINOR__ == 1 && 0 < __GNUC_PATCHLEVEL__ < 3
Comment 1 sparcmoz 2006-11-06 04:15:06 UTC
Created attachment 40351 [details]
allow gcc4.1.2 warnings are errors
Comment 2 sparcmoz 2006-11-06 04:15:53 UTC
start
Comment 3 sparcmoz 2006-11-06 09:06:55 UTC
sb: is it OK to include gcc4.1.2 in this workaround - I am just not sure why it
is limited to 4.1.1?
Comment 4 Stephan Bergmann 2006-11-06 09:21:42 UTC
Strictly speaking, 4.1.2 does not yet exist, so it is unclear whether that issue
will be fixed in 4.1.2.

Anyway, I guess nobody had tested with 4.1.2 yet and the #if was intended to be
as specific as possible (i.e., it had empirically only been tested to fail with
4.1.1, so that was used for discrimination).  However, if it is clear that it
also fails with 4.1.2, I would assume that it at least also failed with 4.1.0
(and maybe also will fail with 4.1.3 upward in the future).  And, given the fact
that the attached patch is wrong (a < b < c does not do in C++ what one might
expect), I would simplify it to

#if __GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ <= 2
Comment 5 sparcmoz 2006-11-06 09:38:31 UTC
sb: thanks, I will use the simplified version. I accept the patch is wrong, but
"a < b < c" actually does work here, today ;)
Comment 6 sparcmoz 2006-11-06 09:50:08 UTC
sb: i see what you mean - this works for me too :) 
3 < __GNUC_PATCHLEVEL__ < 2
Comment 7 sparcmoz 2006-11-09 02:10:42 UTC
committed in cws_src680_jw2
Comment 8 sparcmoz 2006-11-09 04:15:27 UTC
re-asign for qa
Comment 9 Stephan Bergmann 2006-11-09 12:54:10 UTC
.
Comment 10 sparcmoz 2006-12-05 09:14:35 UTC
Integrated in m195