This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]