According to the POSIX standard, files named on the awk command line must be text files. It is a fatal error if they are not. Most versions of awk treat a directory on the command line as a fatal error.
By default, gawk produces a warning for a directory on the command line, but otherwise ignores it. If either of the --posix or --traditional options is given, then gawk reverts to treating a directory on the command line as a fatal error.