| 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: | Thu, 8 Jul 2004 11:49:20 +0200 (W. Europe Daylight Time) |
| From: | Daniel Lungu <lungu AT nagra DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | negative error status: gcc vs. cl |
| Message-ID: | <Pine.WNT.4.21.0407081106020.247-100000@pc0197.nagra-kudelski.ch> |
| X-X-Sender: | lungu AT castor DOT hq DOT k DOT grp |
| MIME-Version: | 1.0 |
Feel like bash tcsh on Cygwin mess up with negative exit status from a cl
compiled .exe
% uname -a
CYGWIN_NT-5.0 pc 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 unknown unknown Cygwin
% echo $SHELL
/bin/bash
% cat nerr.c
int main()
{
exit (-2);
}
% gcc -o nerr-gcc nerr.c
% cl -o nerr-cl nerr.c
Micro$oft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
Copyright (C) Micro$oft Corp 1984-1998. All rights reserved.
nerr.c
Micro$oft (R) Incremental Linker Version 6.00.8168
Copyright (C) Micro$oft Corp 1992-1998. All rights reserved.
/out:nerr.exe
/out:nerr-cl.exe
nerr.obj
-----unsigned-8b-exit-status-----
% nerr-gcc.exe; echo $?
254
-----wrong-nil(!)-exit-status-----
% nerr-cl.exe; echo $?
0
> ver
Microsoft Windows 2000 [Version 5.00.2195]
-----unsigned-16b-exit-status-----
> nerr-gcc.exe
> echo %ERRORLEVEL%
65534
-----signed-exit-status-----
> nerr-cl.exe
> echo %ERRORLEVEL%
-2
Positive exit status works fine from gcc and cl.
Thanks for any feedback.
--
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 |