🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1648

union problems

#1648
From: Ken Yap
Date: Tue, 24 Jan 1989 01:22
43 lines
1313 bytes
BUG REPORT

tm.h = tm-sun3.h
md = m68k.md
aux-output.c = output-m68k.c

sun 3-50, Sun Unix 3.4

Summary:

Does not report name clash resulting from member of unnamed union.
Last reported in 1.25.1.

g++ version 1.32

---------------------------

struct foo
{
	union
	{
		int		i;
	};
	char	*i;
};

main()
{
	foo		bar;

	bar.i = "Hello";
	bar.i = 42;
}

g++ version 1.32.0
 /usr/su/lib/gcc-cpp+ -+ -v -undef -D__GNU__ -D__GNUG__ -Dmc68000 -Dsun -Dunix bug5.cc /tmp/cca00711.cpp
GNU CPP version 1.32.0
 /usr/su/lib/gcc-c++ /tmp/cca00711.cpp -quiet -dumpbase bug5.cc -noreg -version -o /tmp/cca00711.s
GNU C++ version 1.32.0 (68k, MIT syntax) compiled by CC.
In function int main ():
bug5.cc:14: warning: assignment of integer from pointer lacks a cast
 as -mc68020 /tmp/cca00711.s -o bug5.o
 /usr/su/lib/gcc-ld++ -C /usr/su/lib/crt0+.o /lib/Mcrt1.o bug5.o -lg++ /usr/su/lib/gnulib+ -lc
Technical Details
Message-ID: <8901240122.AA24980@cedar.cs.rochester.edu>
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!CS.ROCHESTER.EDU!ken

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!CS.ROCHESTER.EDU!ken
From: ken@CS.ROCHESTER.EDU (Ken Yap)
Newsgroups: gnu.g++.bug
Subject: union problems
Message-ID: <8901240122.AA24980@cedar.cs.rochester.edu>
Date: 24 Jan 89 01:22:38 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 43