| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| To: | cygwin AT cygwin DOT com |
| From: | "Alex Vinokur" <alexvn AT connect DOT to> |
| Subject: | Re: gcc -mno-cygwin foo.c & gcc foo.c generate different behavior |
| Date: | Tue, 22 Jun 2004 19:10:34 +0300 |
| Lines: | 45 |
| Message-ID: | <cb9llt$v4e$1@sea.gmane.org> |
| References: | <cb9lec$ueu$1 AT sea DOT gmane DOT org> |
| X-Complaints-To: | usenet AT sea DOT gmane DOT org |
| X-Gmane-NNTP-Posting-Host: | 82.166.217.97 |
| X-Newsreader: | Microsoft Outlook Express 6.00.2800.1409 |
"Alex Vinokur" <alexvn AT connect DOT to> wrote in message news:cb9lec$ueu$1 AT sea DOT gmane DOT org...
> ====================
> Windows 2000
> CYGWIN_NT-5.0 1.5.10-3 (0.116/4/2)
> gcc (GCC) 3.3.1 (cygming special)
> ====================
>
>
>
> ------ foo.c ------
>
> #include <stdio.h>
>
> struct foo
> {
> char* bar_;
> };
>
> int main()
> {
> char* ch = "ABC";
--------------------------
> struct foo* f;
f is not initialized
--------------------------
>
> f->bar_ = ch; /* gcc foo.c : Segmentation fault */
> printf("start\n");
> printf("---> %s\n", f->bar_);
> printf("finish\n");
>
> return 0;
>
> }
>
[snip]
--
Alex Vinokur
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn
--
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |