This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
gcc 3.3.1 problem
- From: Gerry Reno <grenoml at yahoo dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 29 Sep 2003 00:34:22 -0700 (PDT)
- Subject: gcc 3.3.1 problem
I'm having a problem with gcc 3.3.1. Here is a sample program that
demos the problem:
// test.c
#include <stdio.h>
#include <windows.h>
typedef struct abc {
HANDLE h1;
HANDLE h2;
} XYZ;
XYZ * somefunc () {
XYZ xyz;
XYZ *ptr = &xyz;
ptr->h1 = (HANDLE) 99;
ptr->h2 = (HANDLE) 88;
printf("somefunc: ptr->h1 = %d\n",ptr->h1);
printf("somefunc: ptr->h2 = %d\n",ptr->h2);
return (ptr);
}
int main(void) {
XYZ *ptr2;
ptr2 = somefunc ();
printf("main: ptr2->h1 = %d\n",ptr2->h1);
printf("main: ptr2->h2 = %d\n",ptr2->h2);
}
------------------------------
-- results --
somefunc: ptr->h1 = 99
somefunc: ptr->h2 = 88
main: ptr2->h1 = 99
main: ptr2->h2 = 99
And sometimes it will give me really large values for main: ptr2-h2
like 4043574.
----------------------
Env:
Cygwin 1.5.5
gcc 3.3.1
=====
Gerry Reno
mailto: grenoml at@ yahoo dot. com
(if mail bounces please retry later - spam rapidly fills up mailbox)
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/