Definitely a compiler bug. I opened a PR to work around it and posted a question on the Oracle forums.-NathanOn Oct 02, 2018, at 12:48 AM, Siegmar Gross wrote:Hi Jeff, hi Nathan,the compilers (Sun C 5.15, Sun C 5.14, Sun C 5.13) don't like the code.loki tmp 110 cc -Vcc: Studio 12.6 Sun C 5.15 Linu
Hi Nathan,
it works for Sun C 5.14 and Sun C 5.15.
loki tmp 111 cc atomic_test.c
loki tmp 112 a.out
loki tmp 113 cc -V
cc: Studio 12.5 Sun C 5.14 Linux_i386 2016/05/31
loki tmp 114 exit
loki tmp 113 cc -V
cc: Studio 12.6 Sun C 5.15 Linux_i386 2017/05/30
loki tmp 114 cc atomic_test.c
loki tmp 1
hmm. Add
#include
to the test and try it again.
-Nathan
> On Oct 2, 2018, at 12:41 AM, Siegmar Gross
> wrote:
>
> Hi Jeff, hi Nathan,
>
> the compilers (Sun C 5.15, Sun C 5.14, Sun C 5.13) don't like the code.
>
> loki tmp 110 cc -V
> cc: Studio 12.6 Sun C 5.15 Linux_i386 2017/05/30
> lok
Hi Jeff, hi Nathan,
the compilers (Sun C 5.15, Sun C 5.14, Sun C 5.13) don't like the code.
loki tmp 110 cc -V
cc: Studio 12.6 Sun C 5.15 Linux_i386 2017/05/30
loki tmp 111 \cc -std=c11 atomic_test.c
"atomic_test.c", line 5: warning: no explicit type given
"atomic_test.c", line 5: syntax error b