public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/43249] unsigned int arg with no prototype gets full 64-bit reg
       [not found] <bug-43249-4@http.gcc.gnu.org/bugzilla/>
@ 2012-04-20 14:46 ` wschmidt at gcc dot gnu.org
  0 siblings, 0 replies; 3+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-04-20 14:46 UTC (permalink / raw)
  To: gcc-bugs

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

William J. Schmidt <wschmidt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |wschmidt at gcc dot gnu.org
         Resolution|                            |INVALID

--- Comment #3 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-04-20 14:45:52 UTC ---
Closing per comment #2.


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

* [Bug target/43249] unsigned int arg with no prototype gets full 64-bit reg
  2010-03-03 19:11 [Bug target/43249] New: " janis at gcc dot gnu dot org
  2010-03-10 18:35 ` [Bug target/43249] " janis at gcc dot gnu dot org
@ 2010-05-26 13:23 ` amodra at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: amodra at gmail dot com @ 2010-05-26 13:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from amodra at gmail dot com  2010-05-26 13:22 -------
I think this testcase may invoke undefined behaviour.  Section 6.5.2.2 of the
ISO C spec says of function calls without a prototype that if "the types of the
arguments after promotion are not compatible with those of the parameters after
promotion, the behavior is undefined, except for the following cases" and the
relevant case is "one promoted type is a signed integer type, the other
promoted type is the corresponding unsigned integer type, and the value is
representable in both types".

The value you are passing, (int)4294967259U, is a negative number so not
representable as an unsigned int.


-- 


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


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

* [Bug target/43249] unsigned int arg with no prototype gets full 64-bit reg
  2010-03-03 19:11 [Bug target/43249] New: " janis at gcc dot gnu dot org
@ 2010-03-10 18:35 ` janis at gcc dot gnu dot org
  2010-05-26 13:23 ` amodra at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: janis at gcc dot gnu dot org @ 2010-03-10 18:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from janis at gcc dot gnu dot org  2010-03-10 18:35 -------
GCC 3.4 also has this bug.


-- 

janis at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bergner at gcc dot gnu dot
                   |                            |org


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


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

end of thread, other threads:[~2012-04-20 14:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-43249-4@http.gcc.gnu.org/bugzilla/>
2012-04-20 14:46 ` [Bug target/43249] unsigned int arg with no prototype gets full 64-bit reg wschmidt at gcc dot gnu.org
2010-03-03 19:11 [Bug target/43249] New: " janis at gcc dot gnu dot org
2010-03-10 18:35 ` [Bug target/43249] " janis at gcc dot gnu dot org
2010-05-26 13:23 ` amodra 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).