]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
OpenMP: Silence uninitialized variable warning in C++ front end.
authorSandra Loosemore <sloosemore@baylibre.com>
Sat, 22 Feb 2025 16:54:50 +0000 (16:54 +0000)
committerAndrew Stubbs <ams@baylibre.com>
Mon, 28 Apr 2025 16:15:12 +0000 (16:15 +0000)
There's no actual problem with the code here, just a false-positive
warning emitted by some older GCC versions.

gcc/cp/ChangeLog
* parser.cc (cp_finish_omp_declare_variant): Initialize
append_args_last.

(cherry picked from commit c978965b445079abbb88c22ba74de1e26e9f5b81)

gcc/cp/parser.cc

index 2faf82ef12d4eec0916d016b6309bbb18b37006a..747209fc77f1ef99b99f311daa4a83d2a9a46e1f 100644 (file)
@@ -51270,7 +51270,7 @@ cp_finish_omp_declare_variant (cp_parser *parser, cp_token *pragma_tok,
   location_t varid_loc = make_location (caret_loc, start_loc, finish_loc);
 
   tree append_args_tree = NULL_TREE;
-  tree append_args_last;
+  tree append_args_last = NULL_TREE;
   bool has_match = false, has_adjust_args = false;
   location_t adjust_args_loc = UNKNOWN_LOCATION;
   location_t append_args_loc = UNKNOWN_LOCATION;