public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/111659] New: document that -Wstrict-flex-arrays depends on -ftree-vrp
@ 2023-10-02  0:16 crrodriguez at opensuse dot org
  2023-10-02  0:34 ` [Bug middle-end/111659] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: crrodriguez at opensuse dot org @ 2023-10-02  0:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111659
           Summary: document that -Wstrict-flex-arrays depends on
                    -ftree-vrp
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: crrodriguez at opensuse dot org
  Target Milestone: ---

For -Wstrict-flex-arrays to be useful -ftree-vrp must be on..which is not the
case when building with -Og or -O1 .

It will be nice for this to be documented everywhere this option is mentioned
so people do not bang their heads against the table like me wondering why Im
getting no warnings on obvious code.

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

* [Bug middle-end/111659] document that -Wstrict-flex-arrays depends on -ftree-vrp
  2023-10-02  0:16 [Bug other/111659] New: document that -Wstrict-flex-arrays depends on -ftree-vrp crrodriguez at opensuse dot org
@ 2023-10-02  0:34 ` pinskia at gcc dot gnu.org
  2023-10-02  0:35 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-10-02  0:34 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-10-02
             Status|UNCONFIRMED                 |NEW
          Component|other                       |middle-end

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Should be a similar wording as -Warray-bounds :
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Warray-bounds

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

* [Bug middle-end/111659] document that -Wstrict-flex-arrays depends on -ftree-vrp
  2023-10-02  0:16 [Bug other/111659] New: document that -Wstrict-flex-arrays depends on -ftree-vrp crrodriguez at opensuse dot org
  2023-10-02  0:34 ` [Bug middle-end/111659] " pinskia at gcc dot gnu.org
@ 2023-10-02  0:35 ` pinskia at gcc dot gnu.org
  2023-10-02 19:12 ` crrodriguez at opensuse dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-10-02  0:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
That is:
It is more effective when -ftree-vrp is active (the default for -O2 and above)
but a subset of instances are issued even without optimization.

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

* [Bug middle-end/111659] document that -Wstrict-flex-arrays depends on -ftree-vrp
  2023-10-02  0:16 [Bug other/111659] New: document that -Wstrict-flex-arrays depends on -ftree-vrp crrodriguez at opensuse dot org
  2023-10-02  0:34 ` [Bug middle-end/111659] " pinskia at gcc dot gnu.org
  2023-10-02  0:35 ` pinskia at gcc dot gnu.org
@ 2023-10-02 19:12 ` crrodriguez at opensuse dot org
  2024-01-17 22:15 ` cvs-commit at gcc dot gnu.org
  2024-01-17 22:17 ` sandra at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: crrodriguez at opensuse dot org @ 2023-10-02 19:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Cristian Rodríguez <crrodriguez at opensuse dot org> ---
Example code that emits no warning (in case if there is of any interest)

curl -LO https://www.netlib.org/fp/dtoa.c

gcc-14 -Og -c -Warray-bounds -fstrict-flex-arrays -Werror=strict-flex-arrays
-DIEEE_8087 dtoa.c

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

* [Bug middle-end/111659] document that -Wstrict-flex-arrays depends on -ftree-vrp
  2023-10-02  0:16 [Bug other/111659] New: document that -Wstrict-flex-arrays depends on -ftree-vrp crrodriguez at opensuse dot org
                   ` (2 preceding siblings ...)
  2023-10-02 19:12 ` crrodriguez at opensuse dot org
@ 2024-01-17 22:15 ` cvs-commit at gcc dot gnu.org
  2024-01-17 22:17 ` sandra at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-17 22:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Sandra Loosemore <sandra@gcc.gnu.org>:

https://gcc.gnu.org/g:eb71695f76378151cb38372051bf50aed792f36d

commit r14-8195-geb71695f76378151cb38372051bf50aed792f36d
Author: Sandra Loosemore <sandra@codesourcery.com>
Date:   Wed Jan 17 21:37:19 2024 +0000

    Clean up documentation for -Wstrict-flex-arrays [PR111659]

    gcc/ChangeLog
            PR middle-end/111659
            * doc/extend.texi (Common Variable Attributes): Fix long lines
            in documentation of strict_flex_array + other minor copy-editing.
            Add a cross-reference to -Wstrict-flex-arrays.
            * doc/invoke.texi (Option Summary): Fix whitespace in tables
            before -fstrict-flex-arrays and -Wstrict-flex-arrays.
            (C Dialect Options): Combine the docs for the two
            -fstrict-flex-arrays forms into a single entry.  Note this option
            is for C/C++ only.  Add a cross-reference to -Wstrict-flex-arrays.
            (Warning Options): Note -Wstrict-flex-arrays is for C/C++ only.
            Minor copy-editing.  Add cross references to the strict_flex_array
            attribute and -fstrict-flex-arrays option.  Add note that this
            option depends on -ftree-vrp.

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

* [Bug middle-end/111659] document that -Wstrict-flex-arrays depends on -ftree-vrp
  2023-10-02  0:16 [Bug other/111659] New: document that -Wstrict-flex-arrays depends on -ftree-vrp crrodriguez at opensuse dot org
                   ` (3 preceding siblings ...)
  2024-01-17 22:15 ` cvs-commit at gcc dot gnu.org
@ 2024-01-17 22:17 ` sandra at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: sandra at gcc dot gnu.org @ 2024-01-17 22:17 UTC (permalink / raw)
  To: gcc-bugs

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

sandra at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from sandra at gcc dot gnu.org ---
Fixed.

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

end of thread, other threads:[~2024-01-17 22:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-02  0:16 [Bug other/111659] New: document that -Wstrict-flex-arrays depends on -ftree-vrp crrodriguez at opensuse dot org
2023-10-02  0:34 ` [Bug middle-end/111659] " pinskia at gcc dot gnu.org
2023-10-02  0:35 ` pinskia at gcc dot gnu.org
2023-10-02 19:12 ` crrodriguez at opensuse dot org
2024-01-17 22:15 ` cvs-commit at gcc dot gnu.org
2024-01-17 22:17 ` sandra 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).