2017-03-16 08:27:53 +0100, address@hidden:
[...]
It seems to me that the 's' flag is supposed to be shown in $- when
bash reads the standard input. Such a case occur when bash is invoked
with the -s option. Example:
$ echo 'echo $-' | bash -s
hBs
However, bash reads the standard input also when there are no more
arguments after option processing. Example
$ echo 'echo $-' | bash
hB
[...]
That was a non-conformance (or at least deviation from every
other Bourne-like shell) of bash. It was fixed in 4.4
$ echo 'echo $- $BASH_VERSION' | bash
hBs 4.4.11(1)-release
IIRC, that was discussed last year either on the Austin group or
bug-bash mailing list.