public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/39063]  New: libgcc2.c:mprotect() for mingw, incompatible pointer type warning
@ 2009-02-01 16:53 sezeroz at gmail dot com
  2009-02-01 16:53 ` [Bug target/39063] " sezeroz at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: sezeroz at gmail dot com @ 2009-02-01 16:53 UTC (permalink / raw)
  To: gcc-bugs

in windows replacement of mprotect() in libgcc2.c uses VirtualProtect
which requires an unsigned, not a signed ptr as its last argument. the
attached patch fixes a 'may be used uninitialized' warning, too.
here are the warnings:
../../../gcc-svn/libgcc/../gcc/libgcc2.c: In function 'mprotect':
../../../gcc-svn/libgcc/../gcc/libgcc2.c:2079: warning: passing argument 4 of
'VirtualProtect' from incompatible pointer type
/opt/buildroot/gcc-svn/winsup/mingw/include/winbase.h:1126: note: expected
'PDWORD' but argument is of type 'int *'
../../../gcc-svn/libgcc/../gcc/libgcc2.c:2064: warning: 'np' may be used
uninitialized in this function


-- 
           Summary: libgcc2.c:mprotect() for mingw, incompatible pointer
                    type warning
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sezeroz at gmail dot com
GCC target triplet: x86_64-pc-mingw32


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39063


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/39063] libgcc2.c:mprotect() for mingw, incompatible pointer type warning
  2009-02-01 16:53 [Bug target/39063] New: libgcc2.c:mprotect() for mingw, incompatible pointer type warning sezeroz at gmail dot com
@ 2009-02-01 16:53 ` sezeroz at gmail dot com
  2009-02-21  9:52 ` ktietz at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: sezeroz at gmail dot com @ 2009-02-01 16:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from sezeroz at gmail dot com  2009-02-01 16:53 -------
Created an attachment (id=17222)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17222&action=view)
mprotect warnings fix


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39063


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/39063] libgcc2.c:mprotect() for mingw, incompatible pointer type warning
  2009-02-01 16:53 [Bug target/39063] New: libgcc2.c:mprotect() for mingw, incompatible pointer type warning sezeroz at gmail dot com
  2009-02-01 16:53 ` [Bug target/39063] " sezeroz at gmail dot com
@ 2009-02-21  9:52 ` ktietz at gcc dot gnu dot org
  2009-03-14 16:00 ` nightstrike at gmail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ktietz at gcc dot gnu dot org @ 2009-02-21  9:52 UTC (permalink / raw)
  To: gcc-bugs



-- 

ktietz at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktietz at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-02-21 09:52:19
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39063


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/39063] libgcc2.c:mprotect() for mingw, incompatible pointer type warning
  2009-02-01 16:53 [Bug target/39063] New: libgcc2.c:mprotect() for mingw, incompatible pointer type warning sezeroz at gmail dot com
  2009-02-01 16:53 ` [Bug target/39063] " sezeroz at gmail dot com
  2009-02-21  9:52 ` ktietz at gcc dot gnu dot org
@ 2009-03-14 16:00 ` nightstrike at gmail dot com
  2009-03-19 10:40 ` gerald at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: nightstrike at gmail dot com @ 2009-03-14 16:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from nightstrike at gmail dot com  2009-03-14 16:00 -------
http://gcc.gnu.org/ml/gcc-patches/2009-03/msg00639.html


-- 

nightstrike at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nightstrike at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39063


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/39063] libgcc2.c:mprotect() for mingw, incompatible pointer type warning
  2009-02-01 16:53 [Bug target/39063] New: libgcc2.c:mprotect() for mingw, incompatible pointer type warning sezeroz at gmail dot com
                   ` (2 preceding siblings ...)
  2009-03-14 16:00 ` nightstrike at gmail dot com
@ 2009-03-19 10:40 ` gerald at gcc dot gnu dot org
  2009-03-19 14:52 ` hjl dot tools at gmail dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: gerald at gcc dot gnu dot org @ 2009-03-19 10:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from gerald at gcc dot gnu dot org  2009-03-19 10:40 -------
Subject: Bug 39063

Author: gerald
Date: Thu Mar 19 10:40:32 2009
New Revision: 144957

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144957
Log:
        PR target/39063
        * libgcc2.c (mprotect): Do not use signed arguments for
        VirtualProtect, use DWORD arguments.  Also fix the 'may
        be used uninitialized' warning for the np variable.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/libgcc2.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39063


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/39063] libgcc2.c:mprotect() for mingw, incompatible pointer type warning
  2009-02-01 16:53 [Bug target/39063] New: libgcc2.c:mprotect() for mingw, incompatible pointer type warning sezeroz at gmail dot com
                   ` (3 preceding siblings ...)
  2009-03-19 10:40 ` gerald at gcc dot gnu dot org
@ 2009-03-19 14:52 ` hjl dot tools at gmail dot com
  2009-03-19 17:50 ` sezeroz at gmail dot com
  2009-04-13 11:55 ` sezeroz at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-03-19 14:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from hjl dot tools at gmail dot com  2009-03-19 14:52 -------
The fix may have broken cross compiling:

http://gcc.gnu.org/ml/gcc/2009-03/msg00525.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39063


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/39063] libgcc2.c:mprotect() for mingw, incompatible pointer type warning
  2009-02-01 16:53 [Bug target/39063] New: libgcc2.c:mprotect() for mingw, incompatible pointer type warning sezeroz at gmail dot com
                   ` (4 preceding siblings ...)
  2009-03-19 14:52 ` hjl dot tools at gmail dot com
@ 2009-03-19 17:50 ` sezeroz at gmail dot com
  2009-04-13 11:55 ` sezeroz at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: sezeroz at gmail dot com @ 2009-03-19 17:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from sezeroz at gmail dot com  2009-03-19 17:49 -------
The prototype for VirtualProtect() is known but the definition of DWORD is
not??
Hrmph. In any case, it should be fixed easily by changing DWORD into unsigned
int
which is what a DWORD is always defined as.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39063


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/39063] libgcc2.c:mprotect() for mingw, incompatible pointer type warning
  2009-02-01 16:53 [Bug target/39063] New: libgcc2.c:mprotect() for mingw, incompatible pointer type warning sezeroz at gmail dot com
                   ` (5 preceding siblings ...)
  2009-03-19 17:50 ` sezeroz at gmail dot com
@ 2009-04-13 11:55 ` sezeroz at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: sezeroz at gmail dot com @ 2009-04-13 11:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from sezeroz at gmail dot com  2009-04-13 11:55 -------
(In reply to comment #4)
> The fix may have broken cross compiling:
> 
> http://gcc.gnu.org/ml/gcc/2009-03/msg00525.html
> 

PR39503 has already been closed for some fime, so this one should be closed,
too.


-- 

sezeroz at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39063


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-04-13 11:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-01 16:53 [Bug target/39063] New: libgcc2.c:mprotect() for mingw, incompatible pointer type warning sezeroz at gmail dot com
2009-02-01 16:53 ` [Bug target/39063] " sezeroz at gmail dot com
2009-02-21  9:52 ` ktietz at gcc dot gnu dot org
2009-03-14 16:00 ` nightstrike at gmail dot com
2009-03-19 10:40 ` gerald at gcc dot gnu dot org
2009-03-19 14:52 ` hjl dot tools at gmail dot com
2009-03-19 17:50 ` sezeroz at gmail dot com
2009-04-13 11:55 ` sezeroz at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).