Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[OWBugzilla] [Bug 1157] Wrongly initialized array of structs

0 views
Skip to first unread message

bugzill...@www.openwatcom.org

unread,
Oct 18, 2014, 10:50:01 AM10/18/14
to openwatco...@openwatcom.org
http://bugzilla.openwatcom.org/show_bug.cgi?id=1157





------- Comment #1 from bro...@physik.rwth-aachen.de 2014-10-18 07:50 PST8PDT -------
Important notice: only the C++ compiler gets that wrong. The C compiler works
just fine.

And it is at least partly caused by the anonymous struct inside the anonymous
union. I'm doubtful those are even fully allowed in C++.

As-is, giving at least one of the anonymous members a name avoids the problem.


--
Configure bugmail: http://bugzilla.openwatcom.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

bugzill...@www.openwatcom.org

unread,
Oct 18, 2014, 11:09:08 AM10/18/14
to openwatco...@openwatcom.org
http://bugzilla.openwatcom.org/show_bug.cgi?id=1157





------- Comment #2 from po...@pobox.sk 2014-10-18 08:09 PST8PDT -------
I might accept the argument that anonymous structs are not allowed in c++ (it's
a nonstandard extension), but in that case the compiler should reject the code.
Either compile it correctly or don't compile it at all. Compiling it wrongly is
not a good idea.
0 new messages