This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28975] New: conflicting declaration 'typedef struct mbstate_t mbstate_t'
- From: "waspswarm at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Sep 2006 15:35:29 -0000
- Subject: [Bug c++/28975] New: conflicting declaration 'typedef struct mbstate_t mbstate_t'
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When compiling the following test application with g++ and
-D__STDC_VERSION__=199901 I receive errors about duplicate declarations.
$ uname -a
HP-UX yellow B.11.23 U ia64 1794711014 unlimited-user license
// g++ -o test.o -g -O2 -mlp64 -D__STDC_VERSION__=199901 -c testmbstate.cpp
// remove -D__STDC_VERSION__=199901 and it compiles cleanly
#include <iostream>
int main(int argc, char** argv)
{
return 0;
}
$ g++ -v -o test.o -g -O2 -mlp64 -D__STDC_VERSION__=199901 -c testmbsta>
Using built-in specs.
Target: ia64-hp-hpux11.23
Configured with: ../gcc-4.1.1/configure --enable-checking=release
--disable-shared --enable-threads=posix --disable-nls --enable-c99
--enable-languages=c,c++ : (reconfigured) ../gcc-4.1.1/configure
--enable-checking=release --disable-shared --enable-threads=posix --disable-nls
--enable-c99 --enable-languages=c,c++ --with-gnu-as
--with-as=/opt/hp-gcc/bin/as --without-gnu-ld
Thread model: posix
gcc version 4.1.1
/usr/local/libexec/gcc/ia64-hp-hpux11.23/4.1.1/cc1plus -quiet -v
-D__STDC_VERSION__=199901 testmbstate.cpp -quiet -dumpbase testmbstate.cpp
-mlp64 -auxbase-strip test.o -g -O2 -version -o /var/tmp//ccLUuqb0.s
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory
"/usr/local/lib/gcc/ia64-hp-hpux11.23/4.1.1/../../../../ia64-hp-hpux11.23/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/lib/gcc/ia64-hp-hpux11.23/4.1.1/../../../../include/c++/4.1.1
/usr/local/lib/gcc/ia64-hp-hpux11.23/4.1.1/../../../../include/c++/4.1.1/ia64-hp-hpux11.23
/usr/local/lib/gcc/ia64-hp-hpux11.23/4.1.1/../../../../include/c++/4.1.1/backward
/usr/local/include
/usr/local/lib/gcc/ia64-hp-hpux11.23/4.1.1/include
/usr/include
End of search list.
GNU C++ version 4.1.1 (ia64-hp-hpux11.23)
compiled by GNU C version 3.4.6.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 8d13e28aaeb67511ccb5485a483e1cbb
/usr/local/lib/gcc/ia64-hp-hpux11.23/4.1.1/../../../../include/c++/4.1.1/cwchar:66:
error: conflicting declaration 'typedef struct mbstate_t mbstate_t'
/usr/include/sys/_mbstate_t.h:15: error: 'mbstate_t' has a previous declaration
as 'typedef struct mbstate_t mbstate_t'
--
Summary: conflicting declaration 'typedef struct mbstate_t
mbstate_t'
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: waspswarm at gmail dot com
GCC build triplet: ia64-hp-hpux11.23
GCC host triplet: ia64-hp-hpux11.23
GCC target triplet: ia64-hp-hpux11.23
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28975