Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Ken Yap
Fri, 07 Oct 1988 02:12
second level unnamed union members not accessible
Author: Ken Yap
Date: Fri, 07 Oct 1988 02:12
Date: Fri, 07 Oct 1988 02:12
48 lines
1241 bytes
1241 bytes
Problem:
Cannot refer to member of an unnamed union within another unnamed union.
Session log:
[elm 26] g++ -v -g bug2.cc
g++ version 1.25.1
/u/cs454/lib/gcc-cpp+ -v -undef -D__GNU__ -D__GNUG__ -Dmc68000 -Dsun -Dunix bug2.cc /tmp/cca13389.cpp
GNU CPP version 1.25.1
/u/cs454/lib/gcc-c++ /tmp/cca13389.cpp -quiet -dumpbase bug2.cc -noreg -version-G -o /tmp/cca13389.s
GNU C++ version 1.25.1 (68k, MIT syntax) compiled by GNU C version 1.25.
In function int main ():
bug2.cc:20: structure has no member named `j'
Program:
struct foo
{
union
{
int i;
union
{
int j;
float f;
};
};
};
main()
{
foo bar;
int n = 42;
bar.i = n;
bar.j = n;
}
Version and environment:
g++ version 1.25.1
tm.h = tm-sun3.h
md = m68k.md
aux-output.c = output-m68k.c
sun 3-50, Sun Unix 3.4
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads