This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
How should i do to use c++ extend attribute?
- From: Shen Hui <shenhui at arch dot cs dot pku dot edu dot cn>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Fri, 21 Mar 2003 9:25:11 +0800
- Subject: How should i do to use c++ extend attribute?
hi,gcc-help
i meet a question when compile an c++ program , i am using gnu gcc-2.95.3:
a file with a struct descripted as follow(/usr/include/bits/in.h line 66-70):
struct ip_opts
{
struct in_addr ip_dst; /* First hop; zero without source route. */
char ip_opts[40]; /* Actually variable in size. */
};
when i compile some c++ file inclueing this header file,my g++ compiler report an error:
ANSI C++ forbids data member `ip_opts' with same name as enclosing class;
but i want g++ to report an warning message at most, how should i do?
Shen Hui
shenhui at arch dot cs dot pku dot edu dot cn
2003-03-21