cl: on failure - there is no shell error code returned with cygwin-3.5.0-1

Satish Balay balay@fastmail.fm
Thu Feb 22 06:16:39 GMT 2024


Usage: Invoke 'cl' from cygwin/bash. i.e:

- run 'Visual Studio CMD' to setup MS compilers in dos shell
- run 'c:\cygwin64\cygwin.bat' [or 'c:\cygwin64\bin\bash --login']
- run 'cl /c test.c'

With cygwin upgrade to 3.5.0-1 - I'm not seeing "error return codes" on compile failures.

However - this works again after downgrading to 3.4.10-1.

Note: This works with 3.5.0-1 - if I use 'mintty' - instead of 'cygwin.bat' or 'bash --login' from 'Compiler CMD'

Perhaps a bug in current cygwin release?

thanks,
Satish

========================================
C:\Program Files\Microsoft Visual Studio\2022\Community>\cygwin64\bin\bash --login

balay@ps5 ~
$ uname -a
CYGWIN_NT-10.0-22631 ps5 3.5.0-1.x86_64 2024-02-01 11:02 UTC x86_64 Cygwin

balay@ps5 ~
$ cat test.c
error

balay@ps5 ~
$ cl /c test.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.38.33134 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

test.c
test.c(2): fatal error C1004: unexpected end-of-file found

balay@ps5 ~
$ echo $?
0
========================================
C:\Program Files\Microsoft Visual Studio\2022\Community>\cygwin64\bin\bash --login

balay@ps5 ~
$ uname -a
CYGWIN_NT-10.0-22631 ps5 3.4.10-1.x86_64 2023-11-29 12:12 UTC x86_64 Cygwin

balay@ps5 ~
$ cl test.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.38.33134 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

test.c
test.c(2): fatal error C1004: unexpected end-of-file found

balay@ps5 ~
$ echo $?
2
========================================




More information about the Cygwin mailing list