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 |
Date: | Fri, 9 Jul 2004 21:23:16 +0200 (W. Europe Daylight Time) |
From: | Daniel Lungu <lungu AT nagra DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | FYI: negative error status: gcc vs. cl |
Message-ID: | <Pine.WNT.4.21.0407092059240.131-100000@pc0197.hq.k.grp> |
X-X-Sender: | lungu AT castor DOT hq DOT k DOT grp |
MIME-Version: | 1.0 |
Igor could be right about (status &= 0xffff), just in case is not masked by _exit() as for msvcrt exit() % cat err.c #include <stdlib.h> int main(int argc, char **argv) { if (argc == 1) return (0); exit(strtol(argv[1], NULL, 16)); } ----- b31 = b16 = 0 ----- % err-cl 0x7ffeff5a ; printf "%x\n" $? 5a ----- b16 = 1 ----- % err-cl 0x7ff1ff5a ; printf "%x\n" $? 0 ----- b31 = 1 ----- % err-cl 0x8ffeff5a ; printf "%x\n" $? 0 ----- havoc with b16 = 1 ----- % err-cl 0x0001105a ; printf "%x\n" $? Urgent condition on I/O channel 90 % err-cl 0x0001205a ; printf "%x\n" $? Signal 32 a0 % err-cl 0x0001405a ; printf "%x\n" $? Signal 64 c0 % err-cl 0x0001305a ; printf "%x\n" $? Signal 48 b0 % err-cl 0x0001505a ; printf "%x\n" $? d0 --daniel -- 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 |