https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105544
Bug ID: 105544
Summary: gdc fails to compile d source from stdin
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: d
Assignee: ibuclaw at gdcproject dot org
Reporter: [email protected]
Target Milestone: ---
Reading code from stdin doesn't work. strace shows that it attempts to read
from a file "<stdin>" repeatedly.
~> echo "pragma(msg, int(__VERSION__));" | /usr/bin/gdc -x d -
<stdin>:2:1: error: Outside Unicode code space
<stdin>:2:1: error: Outside Unicode code space
<stdin>:2:1: error: Outside Unicode code space
<stdin>:2:1: error: Outside Unicode code space
...
<stdin>:2: error: no identifier for declarator �����������...
Expected behaviour:
~> echo "pragma(msg, int(__VERSION__));" > ver.d; /usr/bin/gdc-11 -x d
/tmp/ver.d
2076
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld:
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../lib64/Scrt1.o: in function
`_start':
/home/abuild/rpmbuild/BUILD/glibc-2.35/csu/../sysdeps/x86_64/start.S:103:
undefined reference to `main'
collect2: error: ld returned 1 exit status