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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Sandra Loosemore
<san...@gcc.gnu.org>:

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

commit r14-10346-gb383719aebe45bbe8cc3944e515ed7caa30e8744
Author: Sandra Loosemore <sloosem...@baylibre.com>
Date:   Tue Jun 25 13:54:43 2024 +0000

    Fix PR c/115587, uninitialized variable in c_parser_omp_loop_nest

    This function had a reference to an uninitialized variable on the
    error path.  The problem was diagnosed by clang but not gcc.  It seems
    the cleanest solution is to initialize all the loop-clause variables
    at the point of declaration rather than at different places in the
    code.

    The C++ front end didn't have this problem, but I've made similar
    changes there to keep the code in sync.

    gcc/c/ChangeLog:

            PR c/115587
            * c-parser.cc (c_parser_omp_loop_nest): Move initializations to
            point of declaration.

    gcc/cp/ChangeLog:

            PR c/115587
            * parser.cc (cp_parser_omp_loop_nest): Move initializations to
            point of declaration.

    (cherry picked from commit 21f1073d388af8af207183b0ed592e1cc47d20ab)

Reply via email to