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 6, 2023
1 parent f4ed4ee commit 2d3e973
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hints/linux.sh
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 2d3e973

Please sign in to comment.