This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28906] [4.2 regression] rejects valid arrays
- From: "tbm at cyrius dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2006 20:10:52 -0000
- Subject: [Bug c++/28906] [4.2 regression] rejects valid arrays
- References: <bug-28906-12387@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from tbm at cyrius dot com 2006-08-31 20:10 -------
Is this the same bug?
(sid)59:tbm@usurper: ~/delta/bin] /usr/lib/gcc-snapshot/bin/g++ -c mini.c
mini.c:40: error: variable-size type declared outside of any function
mini.c:40: error: variable-size type declared outside of any function
Testcase:
extern "C"
{
typedef long unsigned int size_t;
extern size_t strlen (__const char *__s) throw () __attribute__ ((__pure__))
__attribute__ ((__nonnull__ (1)));
struct addrinfo
{
}
_G_fpos64_t;
typedef unsigned char cc_t;
}
extern char *hostname;
extern char NetTraceFile[];
void SetNetTrace (const char *);
typedef struct
{
}
Clocks;
char **genget (const char *, char **, int);
struct setlist
{
const char *name;
const char *help;
void (*handler) (const char *);
cc_t *charp;
};
static struct setlist Setlist[] = {
{
"tracefile", "file to write trace information to", SetNetTrace,
(cc_t *) NetTraceFile}
};
static struct setlist *
getset (const char *name)
{
return (struct setlist *) genget (name, (char **) Setlist,
sizeof (struct setlist));
char *hostp = __null;
{
hostname = new char[strlen (hostp) + 1];
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28906