[Bug middle-end/91490] [9 Regression] bogus argument missing terminating nul warning on strlen of a flexible array member

2022-05-27 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91490

Richard Biener  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED
   Target Milestone|9.5 |10.0

--- Comment #11 from Richard Biener  ---
Fixed in GCC 10.

[Bug middle-end/91490] [9 Regression] bogus argument missing terminating nul warning on strlen of a flexible array member

2022-03-17 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91490

Martin Sebor  changed:

   What|Removed |Added

   Assignee|msebor at gcc dot gnu.org  |unassigned at gcc dot 
gnu.org
 Status|ASSIGNED|NEW

--- Comment #10 from Martin Sebor  ---
I'm no longer planning to backport the fix.

[Bug middle-end/91490] [9 Regression] bogus argument missing terminating nul warning on strlen of a flexible array member

2021-06-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91490

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|9.4 |9.5

--- Comment #9 from Richard Biener  ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

[Bug middle-end/91490] [9 Regression] bogus argument missing terminating nul warning on strlen of a flexible array member

2020-09-04 Thread wielkiegie at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91490

Gustaw Smolarczyk  changed:

   What|Removed |Added

 CC||wielkiegie at gmail dot com

--- Comment #8 from Gustaw Smolarczyk  ---
Bug 96934 is potentially related to this issue, but I have also found a
miscompilation of strcmp call that is possibly related.

[Bug middle-end/91490] [9 Regression] bogus argument missing terminating nul warning on strlen of a flexible array member

2020-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91490

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|9.3 |9.4

--- Comment #7 from Jakub Jelinek  ---
GCC 9.3.0 has been released, adjusting target milestone.

[Bug middle-end/91490] [9 Regression] bogus argument missing terminating nul warning on strlen of a flexible array member

2019-09-20 Thread programmer at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91490

programmer at posteo dot de changed:

   What|Removed |Added

 CC||programmer at posteo dot de

--- Comment #6 from programmer at posteo dot de ---
The same bogus warning ist produced by "g++ -Wall" with the C++ code below.
Note that flexible array members are not involved there.

GCC 9.2 is affected: https://godbolt.org/z/j9m4XS
GCC 10 seems fixed: https://godbolt.org/z/DPrR1Z

//

struct two_chars_t {// std::array
  char data_[2];
  constexpr const char* data() const { return data_; }
};

constexpr two_chars_t global_x0  = two_chars_t{'x', '\0'};

int main() {
  constexpr const char* pointer = global_x0.data();

  static_assert(pointer[0] == 'x');
  static_assert(pointer[1] == '\0');

  return __builtin_strlen(pointer);
}

//

[Bug middle-end/91490] [9 Regression] bogus argument missing terminating nul warning on strlen of a flexible array member

2019-09-05 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91490

Martin Sebor  changed:

   What|Removed |Added

 CC||jbeulich at suse dot com

--- Comment #5 from Martin Sebor  ---
*** Bug 91667 has been marked as a duplicate of this bug. ***

[Bug middle-end/91490] [9 Regression] bogus argument missing terminating nul warning on strlen of a flexible array member

2019-08-22 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91490

Martin Sebor  changed:

   What|Removed |Added

Summary|[9/10 Regression] bogus |[9 Regression] bogus
   |argument missing|argument missing
   |terminating nul warning on  |terminating nul warning on
   |strlen of a flexible array  |strlen of a flexible array
   |member  |member

--- Comment #4 from Martin Sebor  ---
Fixed in r274837.  I'm not sure this should be backported.  It suppresses bogus
warnings but also introduces new warnings for invalid code.