I know that it is possible to reverse "$@" using an array:
arr=( "$@" )
And using this answer, reverse the array.
But that requires a shell that has arrays.
It is also possible using tac:
set -- $( printf '%s\n' "$@" | tac )
But that breaks if the parameters have spaces, tabs or tab newlines (assuming the default value of $IFS) or containscontain wildcard characters (unless globbing is disabled beforehand) and removes empty elements, and requires the GNU tac command (using tail -r is slightly more portable outside of GNU systems but with some implementations fails on large input).
Is there a way to reverse shell positional arguments portably, without using an array, and that works even if arguments contain whitespaces or newlines or wildcards or are possibly empty?