public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug objc/11277] New: function call stack disorder.
@ 2003-06-21  5:30 i18rabbit at hotmail dot com
  2003-06-21 14:28 ` [Bug target/11277] " pinskia at physics dot uc dot edu
  2003-06-27  3:33 ` pinskia at physics dot uc dot edu
  0 siblings, 2 replies; 3+ messages in thread
From: i18rabbit at hotmail dot com @ 2003-06-21  5:30 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: function call stack disorder.
           Product: gcc
           Version: 2.95.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: objc
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: i18rabbit@hotmail.com
                CC: gcc-bugs@gcc.gnu.org

The following function call fails:

foo(fgetc(FPOINTER), fgetc(FPOINTER), i);

---

int foo(int x, int y, int i) {
    ...
}

receives the 2nd fgetc() char as "x",
and the 1st fgetc() char as "y".

The following works correctly:

x=fgetc(FPOINTER); y=fgetc(FPOINTER)
foo(x, y, i);


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

* [Bug target/11277] function call stack disorder.
  2003-06-21  5:30 [Bug objc/11277] New: function call stack disorder i18rabbit at hotmail dot com
@ 2003-06-21 14:28 ` pinskia at physics dot uc dot edu
  2003-06-27  3:33 ` pinskia at physics dot uc dot edu
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-21 14:28 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
          Component|objc                        |target


------- Additional Comments From pinskia at physics dot uc dot edu  2003-06-21 14:24 -------
What platform are you using i686 on linux or otherwise?
Also can you provide with full source that causes the problem, this sounds like a missing 
prototype of the functions.


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

* [Bug target/11277] function call stack disorder.
  2003-06-21  5:30 [Bug objc/11277] New: function call stack disorder i18rabbit at hotmail dot com
  2003-06-21 14:28 ` [Bug target/11277] " pinskia at physics dot uc dot edu
@ 2003-06-27  3:33 ` pinskia at physics dot uc dot edu
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-27  3:33 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


------- Additional Comments From pinskia at physics dot uc dot edu  2003-06-27 03:33 -------
The test case is invalid as ANSI/ISO C say the order of excucation between squence 
points are undefined, so gcc exucutes the right one first and then the left one so this 
prefectly valid thing for gcc to do, correct your code as you suggested fixes it.


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

end of thread, other threads:[~2003-06-27  3:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-21  5:30 [Bug objc/11277] New: function call stack disorder i18rabbit at hotmail dot com
2003-06-21 14:28 ` [Bug target/11277] " pinskia at physics dot uc dot edu
2003-06-27  3:33 ` pinskia at physics dot uc dot edu

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).