getopt/getopt_long is actually not supposed to return ':' if the optstring does not _begin_ with a colon (e.g. ":g:") or a +/- sign followed by a colon (e.g. "+:g" - this actually has another bug, but that's not what this report is about).