Skip to content

Commit

Permalink
sun/oracle workshop c99: allow for trailing zero size arrays
Browse files Browse the repository at this point in the history
Encountered while testing -O1 with the workshop compiler on
Oracle Linux, follows the same test and workaround done in
hints/solaris_2.sh
  • Loading branch information
tonycoz committed Nov 2, 2023
1 parent 5400d67 commit 20793c3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hints/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@ case "`${cc:-cc} -V 2>&1`" in
d_attribute_pure='undef'
d_attribute_unused='undef'
d_attribute_warn_unused_result='undef'
case "$cc" in
*c99) # Without -Xa c99 errors on some Linux system headers
# in particular zero sized arrays at the end of structs
case "$ccflags" in
*-Xa*) ;;
*) ccflags="$ccflags -Xa" ;;
esac
;;
esac
;;
esac

Expand Down

0 comments on commit 20793c3

Please sign in to comment.