Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Ken Yap
Tue, 11 Oct 1988 03:16
more unnamed union problems
Author: Ken Yap
Date: Tue, 11 Oct 1988 03:16
Date: Tue, 11 Oct 1988 03:16
42 lines
1227 bytes
1227 bytes
Problem:
Field name clash elicits no error message but first field declaration wins.
Session log:
[oak 20] g++ -v -g -W -c bug5.cc
g++ version 1.25.1
/u/cs454/lib/gcc-cpp+ -v -undef -D__GNU__ -D__GNUG__ -Dmc68000 -Dsun -Dunix bug5.cc /tmp/cca23370.cpp
GNU CPP version 1.25.1
/u/cs454/lib/gcc-c++ /tmp/cca23370.cpp -quiet -dumpbase bug5.cc -W -noreg -version -G -o /tmp/cca23370.s
GNU C++ version 1.25.1 (68k, MIT syntax) compiled by GNU C version 1.25.
In function int main ():
bug5.cc:14: warning: assignment of integer from pointer lacks a cast
Program:
struct foo
{
union
{
int i;
};
char *i;
};
main()
{
foo bar;
bar.i = "Hello";
}
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