diff options
author | Sandra Loosemore <sloosemore@baylibre.com> | 2024-06-25 13:54:43 +0000 |
---|---|---|
committer | Sandra Loosemore <sloosemore@baylibre.com> | 2024-06-25 14:28:40 +0000 |
commit | 21f1073d388af8af207183b0ed592e1cc47d20ab (patch) | |
tree | fe198c2e4ea7865a2865fd76d50e9a6ee2b803bf /gcc/profile-count.h | |
parent | 3587bfae391616d155de0c9cbe98206634f3ed6b (diff) |
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.
Diffstat (limited to 'gcc/profile-count.h')
0 files changed, 0 insertions, 0 deletions