public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c/46116] New: Allow passing of anonymous aggregates when signature matches @ 2010-10-21 12:50 robert.staudinger at gmail dot com 2010-10-21 18:36 ` [Bug c/46116] " pinskia at gcc dot gnu.org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: robert.staudinger at gmail dot com @ 2010-10-21 12:50 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46116 Summary: Allow passing of anonymous aggregates when signature matches Product: gcc Version: 4.4.5 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c AssignedTo: unassigned@gcc.gnu.org ReportedBy: robert.staudinger@gmail.com Created attachment 22105 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22105 anon-aggregate-stack.c It would be nice if GCC allowed passing of anonymous aggregates if their signatures match. Currently, judging from the error message, it seems like no attempt is being made at finding out if the anonymous types would match. anon-aggregate-stack.c:15: error: incompatible type for argument 1 of ‘f’ anon-aggregate-stack.c:6: note: expected ‘struct <anonymous>’ but argument is of type ‘struct <anonymous>’ ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/46116] Allow passing of anonymous aggregates when signature matches 2010-10-21 12:50 [Bug c/46116] New: Allow passing of anonymous aggregates when signature matches robert.staudinger at gmail dot com @ 2010-10-21 18:36 ` pinskia at gcc dot gnu.org 2010-10-22 6:04 ` robert.staudinger at gmail dot com ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu.org @ 2010-10-21 18:36 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46116 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|minor |enhancement --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2010-10-21 18:36:28 UTC --- Did you see the first warning message: t.c:6:11: warning: anonymous struct declared inside parameter list [enabled by default] t.c:6:11: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/46116] Allow passing of anonymous aggregates when signature matches 2010-10-21 12:50 [Bug c/46116] New: Allow passing of anonymous aggregates when signature matches robert.staudinger at gmail dot com 2010-10-21 18:36 ` [Bug c/46116] " pinskia at gcc dot gnu.org @ 2010-10-22 6:04 ` robert.staudinger at gmail dot com 2021-10-16 7:26 ` muecker at gwdg dot de ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: robert.staudinger at gmail dot com @ 2010-10-22 6:04 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46116 --- Comment #2 from Rob Staudinger <robert.staudinger at gmail dot com> 2010-10-22 06:04:04 UTC --- (In reply to comment #1) > Did you see the first warning message: [...] Yes and I did not like it much either, because in my book the idea of an anonymous declaration is that it's only valid in a restricted scope. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/46116] Allow passing of anonymous aggregates when signature matches 2010-10-21 12:50 [Bug c/46116] New: Allow passing of anonymous aggregates when signature matches robert.staudinger at gmail dot com 2010-10-21 18:36 ` [Bug c/46116] " pinskia at gcc dot gnu.org 2010-10-22 6:04 ` robert.staudinger at gmail dot com @ 2021-10-16 7:26 ` muecker at gwdg dot de 2024-04-02 22:10 ` pinskia at gcc dot gnu.org 2024-04-03 5:37 ` uecker at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: muecker at gwdg dot de @ 2021-10-16 7:26 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46116 Martin Uecker <muecker at gwdg dot de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |muecker at gwdg dot de --- Comment #3 from Martin Uecker <muecker at gwdg dot de> --- I have a(very preliminary) patch here: https://github.com/uecker/gcc/tree/tagcompat It implements an option -ftagcompat that makes structs with same tag (or no tag) and content compatible as proposed in N2366. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/46116] Allow passing of anonymous aggregates when signature matches 2010-10-21 12:50 [Bug c/46116] New: Allow passing of anonymous aggregates when signature matches robert.staudinger at gmail dot com ` (2 preceding siblings ...) 2021-10-16 7:26 ` muecker at gwdg dot de @ 2024-04-02 22:10 ` pinskia at gcc dot gnu.org 2024-04-03 5:37 ` uecker at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu.org @ 2024-04-02 22:10 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46116 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |14.0 Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Fixed for GCC 14 with C23 work. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/46116] Allow passing of anonymous aggregates when signature matches 2010-10-21 12:50 [Bug c/46116] New: Allow passing of anonymous aggregates when signature matches robert.staudinger at gmail dot com ` (3 preceding siblings ...) 2024-04-02 22:10 ` pinskia at gcc dot gnu.org @ 2024-04-03 5:37 ` uecker at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: uecker at gcc dot gnu.org @ 2024-04-03 5:37 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46116 uecker at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |uecker at gcc dot gnu.org --- Comment #5 from uecker at gcc dot gnu.org --- It requires a tag though as WG14 did not want to allow this for anonymous structs. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-04-03 5:37 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-10-21 12:50 [Bug c/46116] New: Allow passing of anonymous aggregates when signature matches robert.staudinger at gmail dot com 2010-10-21 18:36 ` [Bug c/46116] " pinskia at gcc dot gnu.org 2010-10-22 6:04 ` robert.staudinger at gmail dot com 2021-10-16 7:26 ` muecker at gwdg dot de 2024-04-02 22:10 ` pinskia at gcc dot gnu.org 2024-04-03 5:37 ` uecker at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).