How should i do to use c++ extend attribute?

Shen Hui shenhui@arch.cs.pku.edu.cn
Fri Mar 21 03:26:00 GMT 2003


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@arch.cs.pku.edu.cn
                 2003-03-21


More information about the Gcc-help mailing list