$ gcc -E - <<< '#include <stdio.h>' | head -n 1 # 1 "<stdin>" $ declare -p PIPESTATUS declare -a PIPESTATUS=([0]="2" [1]="0") $ gcc --version gcc (Debian 10.2.1-6) 10.2.1 20210110 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. gcc returns 2 in the above example. This does not follow the standard convention on Linux. For example, the exit status of seq is 141 which corresponds to a SIGPIPE signal. $ seq 1000000 | head -n 1 1 $ declare -p PIPESTATUS declare -a PIPESTATUS=([0]="141" [1]="0") Should gcc conform to this standard as well? Thanks. -- Regards, Peng