public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105656] New: remove BROKEN_VALUE_INITIALIZATION workaround
@ 2022-05-19  8:17 aldot at gcc dot gnu.org
  2022-05-19  8:25 ` [Bug c++/105656] " marxin at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: aldot at gcc dot gnu.org @ 2022-05-19  8:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105656

            Bug ID: 105656
           Summary: remove BROKEN_VALUE_INITIALIZATION workaround
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aldot at gcc dot gnu.org
  Target Milestone: ---

BROKEN_VALUE_INITIALIZATION was added for PR89494, a bootstrap failure of
gcc-10 with a gcc-4.2 system compiler.

Since at least gcc-13, maybe gcc-12, we require a stage1 c++ compiler >=
gcc-4.8, hence the BROKEN_VALUE_INITIALIZATION seems to be dead code for it
guards against GCC_VERSION > 0 && GCC_VERSION < 4004

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/105656] remove BROKEN_VALUE_INITIALIZATION workaround
  2022-05-19  8:17 [Bug c++/105656] New: remove BROKEN_VALUE_INITIALIZATION workaround aldot at gcc dot gnu.org
@ 2022-05-19  8:25 ` marxin at gcc dot gnu.org
  2022-05-19 10:27 ` aldot at gcc dot gnu.org
  2023-01-06  6:45 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-05-19  8:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105656

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
I was suggesting a similar change, but it's more complicated.
Please read the following thread:
https://gcc.gnu.org/pipermail/gcc-patches/2022-May/594102.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/105656] remove BROKEN_VALUE_INITIALIZATION workaround
  2022-05-19  8:17 [Bug c++/105656] New: remove BROKEN_VALUE_INITIALIZATION workaround aldot at gcc dot gnu.org
  2022-05-19  8:25 ` [Bug c++/105656] " marxin at gcc dot gnu.org
@ 2022-05-19 10:27 ` aldot at gcc dot gnu.org
  2023-01-06  6:45 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: aldot at gcc dot gnu.org @ 2022-05-19 10:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105656

--- Comment #2 from Bernhard Reutner-Fischer <aldot at gcc dot gnu.org> ---
Yes, i've seen your bigger patch to remove all of these version conditionals.

But please note that this BROKEN_VALUE_INITIALIZATION was explicitly taylored
to catch aforementioned GCC versions, and really GCC itself. It even explicitly
excluded clang as that announces itself as 4.2.

/* GCC older than 4.4 have broken C++ value initialization handling, see
   PR11309, PR30111, PR33916, PR82939 and PR84405 for more details.  */
#if GCC_VERSION > 0 && GCC_VERSION < 4004 && !defined(__clang__)
# define BROKEN_VALUE_INITIALIZATION
#endif

Your big patch could maybe be refined a bit. For example, i think newer GCC do
recognize popcount patterns, so i assume that the conditions in
bitmap_count_bits_in_word should no longer be needed; Also, i assume that any
compiler that is used to build gcc will have to implement builtins like
__builtin_popcount{,l,ll} anyway. Same should hold true for ctz, clz, ffs.
I'm not sure what the standard has to say about unknown pragmas, but i'd assume
that a compiler should silently ignore "#pragma GCC whatever" if it doesn't
feel responsible for that identifier. If so, then using the GCC pragmas
unconditionally should be fine.
Maybe we should have an ATTRIBUTE_FORMAT macro to handle all of these
occurrences.
All in all, i think now that we require c++, and c++11 even, most of these
guards should probably key off plain __GNUC__, as Richard said.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/105656] remove BROKEN_VALUE_INITIALIZATION workaround
  2022-05-19  8:17 [Bug c++/105656] New: remove BROKEN_VALUE_INITIALIZATION workaround aldot at gcc dot gnu.org
  2022-05-19  8:25 ` [Bug c++/105656] " marxin at gcc dot gnu.org
  2022-05-19 10:27 ` aldot at gcc dot gnu.org
@ 2023-01-06  6:45 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-01-06  6:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105656

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |internal-improvement
   Last reconfirmed|                            |2023-01-06
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-06  6:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-19  8:17 [Bug c++/105656] New: remove BROKEN_VALUE_INITIALIZATION workaround aldot at gcc dot gnu.org
2022-05-19  8:25 ` [Bug c++/105656] " marxin at gcc dot gnu.org
2022-05-19 10:27 ` aldot at gcc dot gnu.org
2023-01-06  6:45 ` pinskia 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).