This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: gnu C++ compilation problem
- From: Kallol Biswas <kallolbiswas at yahoo dot com>
- To: bug-gcc at gnu dot org
- Date: Sat, 9 Feb 2002 23:56:36 -0800 (PST)
- Subject: Re: gnu C++ compilation problem
--- Kallol Biswas <kallolbiswas@yahoo.com> wrote:
> #gcc -v
> gcc version 2.95 19990728 (release)
>
> The following .cpp file can't be compiled. Any
> workaround is greatly appreciated.
>
> -------------------ll.cpp----------------------
>
> struct ip_opts
> {
> int x;
> char ip_opts[40]; /* Actually variable
> in size. */
> };
>
> main()
> {
>
> struct ip_opts tmp;
>
> tmp.x=10;
>
> }
>
> The error message displayed is:
>
> gcc /tmp/ll.cpp
> /tmp/ll.cpp:4: ANSI C++ forbids data member
> `ip_opts'
> with same name as enclosing class
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE Valentine eCards with Yahoo! Greetings!
> http://greetings.yahoo.com
__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com