title: Work-around for $@ unbound variable in Bash 4.0.0?
body: <p>In specifically Bash version <code>4.0.0</code>, is there any way to work around the use of an empty <code>$@</code> raising an unbound variable error when <code>set -u</code> is enabled?</p>
  
  <p>Consider the following:</p>
  
  <pre><code>#!/usr/bin/env bash-4.0.0-1
  
  set -xvu
  
  echo "$BASH_VERSION"
  echo "${BASH_VERSINFO[@]}"
  
  main () {
    printf '%q\n' "${@:-}"
  }
  
  main "${@:-}"
  </code></pre>
  
  <p>Gives me the following output when I provide an empty set of arguments:</p>
  
  <pre><code>neech@nicolaw.uk:~ $ ./test.sh
  
  echo "$BASH_VERSION"
  + echo '4.0.0(1)-release'
  4.0.0(1)-release
  echo "${BASH_VERSINFO[@]}"
  + echo 4 0 0 1 release x86_64-unknown-linux-gnu
  4 0 0 1 release x86_64-unknown-linux-gnu
  
  main () {
    printf '%q\n' "${@:-}"
  }
  
  main "${@:-}"
  ./test.sh: line 12: $@: unbound variable
  </code></pre>
  
  <p>I only see this behaviour in Bash version <code>4.0.0</code>.</p>
  
  <p>I was hoping that using variable substitution <code>${@:-}</code> would allow me to work around this, but it seems not.</p>
  
  <p>Is there a way to work around this?</p>