[Mono-bugs] [Bug 73717][Nor] New - libgdiplus fails to compile with gcc 4

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 15 Mar 2005 11:52:57 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by paul@all-the-johnsons.co.uk.

http://bugzilla.ximian.com/show_bug.cgi?id=73717

--- shadow/73717	2005-03-15 11:52:57.000000000 -0500
+++ shadow/73717.tmp.14923	2005-03-15 11:52:57.000000000 -0500
@@ -0,0 +1,106 @@
+Bug#: 73717
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: FC rawhide (4 t 1)
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: jordi@ximian.com                            
+ReportedBy: paul@all-the-johnsons.co.uk               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: libgdiplus fails to compile with gcc 4
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+libgdiplus fails to compile with gcc 4 from svn
+
+Steps to reproduce the problem:
+1. download libgdiplus from svn (devel version) 
+2. ./autogen.sh; make 
+3. 
+
+Actual Results:
+The compilation fails with the following throwback
+
+cc1: warnings being treated as errors
+font.c: In function 'GdipCreateFontFamilyFromName':
+font.c:283: warning: pointer targets in passing argument 1 of 'strlen'
+differ in signedness
+font.c:283: warning: pointer targets in passing argument 1 of 'strlen'
+differ in signedness
+font.c:283: warning: pointer targets in passing argument 1 of
+'__builtin_strcmp' differ in signedness
+font.c:283: warning: pointer targets in passing argument 2 of
+'__builtin_strcmp' differ in signedness
+font.c:283: warning: pointer targets in passing argument 1 of 'strlen'
+differ in signedness
+font.c:283: warning: pointer targets in passing argument 1 of
+'__builtin_strcmp' differ in signedness
+font.c:283: warning: pointer targets in passing argument 2 of
+'__builtin_strcmp' differ in signedness
+font.c:283: warning: pointer targets in passing argument 1 of 'strlen'
+differ in signedness
+font.c:283: warning: pointer targets in passing argument 1 of
+'__builtin_strcmp' differ in signedness
+font.c:283: warning: pointer targets in passing argument 2 of
+'__builtin_strcmp' differ in signedness
+font.c:283: warning: pointer targets in passing argument 1 of
+'__builtin_strcmp' differ in signedness
+font.c:283: warning: pointer targets in passing argument 2 of
+'__builtin_strcmp' differ in signedness
+font.c: In function 'GdipCreateFont':
+font.c:648: warning: pointer targets in passing argument 1 of 'strlen'
+differ in signedness
+font.c:648: warning: pointer targets in passing argument 1 of
+'__builtin_strcmp' differ in signedness
+font.c:648: warning: pointer targets in passing argument 1 of 'strlen'
+differ in signedness
+font.c:648: warning: pointer targets in passing argument 1 of
+'__builtin_strcmp' differ in signedness
+font.c:648: warning: pointer targets in passing argument 1 of
+'__builtin_strcmp' differ in signedness
+font.c:648: warning: pointer targets in passing argument 1 of
+'__builtin_strcmp' differ in signedness
+font.c:676: warning: pointer targets in passing argument 1 of 'strlen'
+differ in signedness
+font.c:681: warning: pointer targets in passing argument 2 of 'strcpy'
+differ in signedness
+font.c:695: warning: pointer targets in passing argument 2 of 'strcpy'
+differ in signedness
+font.c: In function 'GdipPrivateAddMemoryFont':
+font.c:780: warning: pointer targets in passing argument 2 of
+'FcConfigAppFontAddFile' differ in signedness
+make[2]: *** [font.lo] Error 1
+make[1]: *** [all-recursive] Error 1
+make: *** [all] Error 2
+
+I have filed this in the redhat bugzilla. This has now been closed with the
+following feedback from RH
+
+The problem is just that the testcase you provided violates ISO C
+standards, nothing else.
+Older GCC versions were warning (resp. erroring out) on this just with
+-pedantic, now this warning is on by default, see:
+http://gcc.gnu.org/ml/gcc-patches/2004-07/msg01284.html
+It can be turned off with -Wno-pointer-sign, but it is better to actually
+fix the code.
+The reason why you get warnings about strlen etc. is that optimized strcmp
+in <bits/string2.h> is implemented as a #define that uses strlen etc.
+internally.
+If you compile with -O0 or -D__NO_STRING_INLINES, you get the warning just
+about strcmp.
+
+Expected Results:
+libgdiplus should compile
+
+How often does this happen? 
+Always
+
+Additional Information: