GCC has found a real bug, it should be
if (!qdir[0])
instead of
if (!qdir)
qdir is really always true because it's global array of 1024 chars. According to the comment, the condition which GCC refuses to compile tests the string in qdir, not the adress of the array itself.
And dodo, don't use stuff which is not yet available for public testing.