[v3 patch] partially fix testsuite/27_io/headers/cstdio/types_std.cc

Jonathan Wakely jwakely@redhat.com
Fri Oct 17 12:22:00 GMT 2014


testsuite/27_io/headers/cstdio/types_std.cc FAILs on dragonflybsd:

/mnt/gcc-src/libstdc++-v3/testsuite/27_io/headers/cstdio/types_std.cc:25:13:
error: aggregate 'FILE gnu::f' has incomplete type and cannot be
defined
/mnt/gcc-src/libstdc++-v3/testsuite/27_io/headers/cstdio/types_std.cc:26:13:
error: aggregate 'FILE gnu::fpos_t' has incomplete type and cannot be
defined

These errors look correct to me, the C standard says that <stdio.h>
declares FILE as an object type, but it doesn't say complete object
type, so I think that's a bug in the test.

I think there's another bug:

#include <cstdio>

namespace gnu
{
  std::size_t s;
  std::FILE f;
  std::FILE fpos_t;
}

Surely that third declaration should be testing that fpos_t is a valid
type, rather than declaring a variable of that name, so I'm committing
the attached patch, which also fixes another fail on dragonflybsd.

Tested x86_64-linux, committed to trunk.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 1290 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141017/f29ae522/attachment.bin>


More information about the Gcc-patches mailing list