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

            Bug ID: 124971
           Summary: gensupport.cc:120: Possible faulty expression ?
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Source code is

      /* Glob till newline or end of string.  */
      while (*templ != '\n' || *templ != '\0')
        templ++;

Maybe better code:

      /* Glob till newline or end of string.  */
      while (*templ != '\n' && *templ != '\0')
        templ++;

git blame says:

957ae9040659 gcc/gensupport.cc (Tamar Christina     2023-06-19 15:47:46 +0100
1018)       /* Glob till newline or end of string.  */
957ae9040659 gcc/gensupport.cc (Tamar Christina     2023-06-19 15:47:46 +0100
1019)       while (*templ != '\n' || *templ != '\0')
957ae9040659 gcc/gensupport.cc (Tamar Christina     2023-06-19 15:47:46 +0100
1020)         templ++;

Reply via email to