Debian Codegraph @

gcc/cobol/ChangeLog

raw
1 2026-06-12 Release Manager
2
3 * GCC 15.3.0 released.
4
5 2025-08-08 Release Manager
6
7 * GCC 15.2.0 released.
8
9 2025-07-29 Robert Dubner <[email protected]>
10
11 Backported from master:
12 2025-07-24 Robert Dubner <[email protected]>
13
14 PR cobol/119231
15 * gcobolspec.cc: (lang_specific_driver): Pass OPT_static through.
16 Handle -static and -static-libgcobol properly.
17
18 2025-07-29 Robert Dubner <[email protected]>
19
20 Backported from master:
21 2025-07-23 Robert Dubner <[email protected]>
22
23 * genapi.cc (leave_procedure): Adjust location_t for PERFORM.
24 (parser_perform_times): Likewise.
25 (internal_perform_through_times): Likewise.
26 (perform_outofline_before_until): Likewise.
27 (perform_outofline_after_until): Likewise.
28 (perform_outofline_testafter_varying): Likewise.
29 (perform_outofline_before_varying): Likewise.
30
31 2025-07-29 Robert Dubner <[email protected]>
32
33 Backported from master:
34 2025-07-21 Robert Dubner <[email protected]>
35 James K. Lowden <[email protected]>
36
37 PR cobol/120402
38 * Make-lang.in: Elminate commented-out scripting.
39 * cbldiag.h (_CBLDIAG_H): Change #if 0 to #if GCOBOL_GETENV
40 (warn_msg): Add printf attributes.
41 (location_dump): Add debugging message.
42 * cdf.y: Improved linemap tracking.
43 * genapi.cc (treeplet_fill_source): const attribute for formal parameter.
44 (insert_nop): Created to consolidate var_decl_nop writes.
45 (build_main_that_calls_something): Move generation to the end of executable.
46 (level_88_helper): Formatting.
47 (parser_call_targets_dump): Formatting.
48 (function_pointer_from_name): const attribute for formal parameter.
49 (parser_initialize_programs): const attribute for formal parameter.
50 (parser_statement_begin): Improved linemap handling.
51 (section_label): Improved linemap handling.
52 (paragraph_label): Improved linemap handling.
53 (pseudo_return_pop): Improved linemap handling.
54 (leave_procedure): Formatting.
55 (parser_enter_section): Improved linemap handling.
56 (parser_enter_paragraph): Improved linemap handling.
57 (parser_perform): Formatting.
58 (parser_leave_file): Move creation of main() to this routine.
59 (parser_enter_program): Move creation of main from here to leave_file.
60 (parser_accept): Formatting. const attribute for formal parameter.
61 (parser_accept_command_line): const attribute for formal parameter.
62 (parser_accept_command_line_count): const attribute for formal parameter.
63 (parser_accept_envar): Likewise.
64 (parser_set_envar): Likewise.
65 (parser_display): Likewise.
66 (get_exhibit_name): Implement EXHIBIT verb.
67 (parser_exhibit): Likewise.
68 (parser_sleep): const attribute for formal parameter.
69 (parser_division): Improved linemap handling.
70 (parser_classify): const attribute for formal parameter.
71 (create_iline_address_pairs): Improved linemap handling.
72 (parser_perform_start): Likewise.
73 (perform_inline_until): Likewise.
74 (perform_inline_testbefore_varying): Likewise.
75 (parser_perform_until): Likewise.
76 (parser_perform_inline_times): Likewise.
77 (parser_intrinsic_subst): const attribute for formal parameter.
78 (parser_file_merge): Formatting.
79 (create_and_call): Improved linemap handling.
80 (mh_identical): const attribute for formal parameter.
81 (mh_numeric_display): const attribute for formal parameter.
82 (mh_little_endian): Likewise.
83 (mh_source_is_group): Likewise.
84 (psa_FldLiteralA): Formatting.
85 * genapi.h (parser_accept): const attribute for formal parameter.
86 (parser_accept_envar): Likewise.
87 (parser_set_envar): Likewise.
88 (parser_accept_command_line): Likewise.
89 (parser_accept_command_line_count): Likewise.
90 (parser_add): Likewise.
91 (parser_classify): Likewise.
92 (parser_sleep): Likewise.
93 (parser_exhibit): Likewise.
94 (parser_display): Likewise.
95 (parser_initialize_programs): Likewise.
96 (parser_intrinsic_subst): Likewise.
97 * gengen.cc (gg_assign): Improved linemap handling.
98 (gg_add_field_to_structure): Likewise.
99 (gg_define_from_declaration): Likewise.
100 (gg_build_relational_expression): Likewise.
101 (gg_goto_label_decl): Likewise.
102 (gg_goto): Likewise.
103 (gg_printf): Likewise.
104 (gg_fprintf): Likewise.
105 (gg_memset): Likewise.
106 (gg_memchr): Likewise.
107 (gg_memcpy): Likewise.
108 (gg_memmove): Likewise.
109 (gg_strcpy): Likewise.
110 (gg_strcmp): Likewise.
111 (gg_strncmp): Likewise.
112 (gg_return): Likewise.
113 (chain_parameter_to_function): Likewise.
114 (gg_define_function): Likewise.
115 (gg_get_function_decl): Likewise.
116 (gg_call_expr): Likewise.
117 (gg_call): Likewise.
118 (gg_call_expr_list): Likewise.
119 (gg_exit): Likewise.
120 (gg_abort): Likewise.
121 (gg_strlen): Likewise.
122 (gg_strdup): Likewise.
123 (gg_malloc): Likewise.
124 (gg_realloc): Likewise.
125 (gg_free): Likewise.
126 (gg_set_current_line_number): Likewise.
127 (gg_get_current_line_number): Likewise.
128 (gg_insert_into_assembler): Likewise.
129 (token_location_override): Likewise.
130 (gg_token_location): Likewise.
131 * gengen.h (location_from_lineno): Likewise.
132 (gg_set_current_line_number): Likewise.
133 (gg_get_current_line_number): Likewise.
134 (gg_token_location): Likewise.
135 (current_token_location): Likewise.
136 (current_location_minus_one): Likewise.
137 (current_location_minus_one_clear): Likewise.
138 (token_location_override): Likewise.
139 * genmath.cc (fast_divide): const attribute for formal parameter.
140 * genutil.cc (get_and_check_refstart_and_reflen): Likewise.
141 (get_data_offset): Likewise.
142 (refer_refmod_length): Likewise.
143 (refer_offset): Likewise.
144 (refer_size): Likewise.
145 (refer_size_dest): Likewise.
146 (refer_size_source): Likewise.
147 (qualified_data_location): Likewise.
148 * genutil.h (refer_offset): Likewise.
149 (refer_size_source): Likewise.
150 (refer_size_dest): Likewise.
151 (qualified_data_location): Likewise.
152 * parse.y: EVALUATE token; Implement EXHIBIT verb;
153 Improved linemap handling.
154 * parse_ante.h (input_file_status_notify): Improved linemap handling.
155 (location_set): Likewise.
156 * scan.l: PICTURE string validation.
157 * scan_ante.h (class picture_t): PICTURE string validation.
158 (validate_picture): Likewise.
159 * symbols.cc (symbol_currency): Revised default currency handling.
160 * symbols.h (symbol_currency): Likewise.
161 * util.cc (location_from_lineno): Improved linemap handling.
162 (current_token_location): Improved linemap handling.
163 (current_location_minus_one): Improved linemap handling.
164 (current_location_minus_one_clear): Improved linemap handling.
165 (gcc_location_set_impl): Improved linemap handling.
166 (warn_msg): Improved linemap handling.
167 * util.h (cobol_lineno): Improved linemap handling.
168
169 2025-07-29 Robert Dubner <[email protected]>
170
171 Backported from master:
172 2025-07-14 Robert Dubner <[email protected]>
173
174 * cobol1.cc (cobol_langhook_handle_option): Eliminate cppcheck warnings.
175 * dts.h: Likewise.
176 * except.cc (cbl_enabled_exceptions_t::dump): Likewise.
177 * gcobolspec.cc (lang_specific_driver): Likewise.
178 * genapi.cc (parser_file_merge): Likewise.
179 * gengen.cc (gg_unique_in_function): Likewise.
180 (gg_declare_variable): Likewise.
181 (gg_peek_fn_decl): Likewise.
182 (gg_define_function): Likewise.
183 * genmath.cc (set_up_on_exception_label): Likewise.
184 (set_up_compute_error_label): Likewise.
185 (arithmetic_operation): Likewise.
186 (fast_divide): Likewise.
187 * genutil.cc (get_and_check_refstart_and_reflen): Likewise.
188 (get_depending_on_value_from_odo): Likewise.
189 (get_data_offset): Likewise.
190 (get_binary_value): Likewise.
191 (process_this_exception): Likewise.
192 (copy_little_endian_into_place): Likewise.
193 (refer_is_clean): Likewise.
194 (refer_fill_depends): Likewise.
195 * genutil.h (process_this_exception): Likewise.
196 (copy_little_endian_into_place): Likewise.
197 (refer_is_clean): Likewise.
198 * lexio.cc (check_push_pop_directive): Likewise.
199 (check_source_format_directive): Likewise.
200 (location_in): Likewise.
201 (lexer_input): Likewise.
202 (cdftext::lex_open): Likewise.
203 (lexio_dialect_mf): Likewise.
204 (valid_sequence_area): Likewise.
205 (cdftext::free_form_reference_format): Likewise.
206 (cdftext::segment_line): Likewise.
207 * lexio.h (struct span_t): Likewise.
208 * scan_ante.h (trim_location): Likewise.
209 * symbols.cc (symbol_elem_cmp): Likewise.
210 (symbol_alphabet): Likewise.
211 (end_of_group): Likewise.
212 (cbl_field_t::attr_str): Likewise.
213 (symbols_update): Likewise.
214 (symbol_typedef_add): Likewise.
215 (symbol_field_add): Likewise.
216 (new_temporary_impl): Likewise.
217 (symbol_label_section_exists): Likewise.
218 (symbol_program_callables): Likewise.
219 (file_status_status_of): Likewise.
220 * symfind.cc (is_data_field): Likewise.
221 (finalize_symbol_map2): Likewise.
222 (class in_scope): Likewise.
223 (symbol_match2): Likewise.
224 * util.cc (get_current_dir_name): Likewise.
225 (gb4): Likewise.
226 (class cdf_directives_t): Likewise.
227 (cbl_field_t::report_invalid_initial_value): Likewise.
228 (literal_subscript_oob): Likewise.
229 (cbl_refer_t::str): Likewise.
230 (date_time_fmt): Likewise.
231 (class unique_stack): Likewise.
232 (cobol_set_pp_option): Likewise.
233 (cobol_filename): Likewise.
234 (cobol_filename_restore): Likewise.
235 (gcc_location_set_impl): Likewise.
236 (ydferror): Likewise.
237 (error_msg_direct): Likewise.
238 (yyerror): Likewise.
239 (cbl_unimplemented_at): Likewise.
240
241 2025-07-29 Robert Dubner <[email protected]>
242
243 Backported from master:
244 2025-07-13 Robert Dubner <[email protected]>
245
246 * Make-lang.in: Eliminate the .cc.o override.
247 * genapi.cc (level_88_helper): Eliminate cppcheck warning.
248 (get_level_88_domain): Likewise.
249 (get_class_condition_string): Likewise.
250 (parser_call_targets_dump): Likewise.
251 (parser_compile_ecs): Likewise.
252 (initialize_variable_internal): Likewise.
253 (move_tree): Likewise.
254 (combined_name): Likewise.
255 (assembler_label): Likewise.
256 (find_procedure): Likewise.
257 (parser_perform): Likewise.
258 (parser_perform_times): Likewise.
259 (internal_perform_through): Likewise.
260 (internal_perform_through_times): Likewise.
261 (psa_FldLiteralN): Likewise.
262 (psa_FldBlob): Likewise.
263 (parser_accept): Likewise.
264 (parser_accept_exception): Likewise.
265 (parser_accept_exception_end): Likewise.
266 (parser_accept_command_line): Likewise.
267 (parser_accept_envar): Likewise.
268 (parser_display_internal): Likewise.
269 (parser_display): Likewise.
270 (parser_assign): Likewise.
271 (parser_initialize_table): Likewise.
272 (parser_arith_error): Likewise.
273 (parser_arith_error_end): Likewise.
274 (parser_division): Likewise.
275 (label_fetch): Likewise.
276 (parser_label_label): Likewise.
277 (parser_label_goto): Likewise.
278 (parser_perform_start): Likewise.
279 (parser_perform_conditional): Likewise.
280 (parser_perform_conditional_end): Likewise.
281 (parser_perform_until): Likewise.
282 (parser_file_delete): Likewise.
283 (parser_intrinsic_subst): Likewise.
284 (create_lsearch_address_pairs): Likewise.
285 (parser_bsearch_start): Likewise.
286 (is_ascending_key): Likewise.
287 (parser_sort): Likewise.
288 (parser_file_sort): Likewise.
289 (parser_return_start): Likewise.
290 (parser_file_merge): Likewise.
291 (parser_string_overflow): Likewise.
292 (parser_unstring): Likewise.
293 (parser_string): Likewise.
294 (parser_call_exception): Likewise.
295 (create_and_call): Likewise.
296 (mh_identical): Likewise.
297 (move_helper): Likewise.
298 (binary_initial_from_float128): Likewise.
299 (initial_from_initial): Likewise.
300 (psa_FldLiteralA): Likewise.
301 (parser_local_add): Likewise.
302 (parser_symbol_add): Likewise.
303 * genapi.h (parser_display): Likewise.
304 * gengen.cc (gg_call_expr): Explict check for NULL_TREE.
305 (gg_call): Likewise.
306 * show_parse.h (SHOW_PARSE_LABEL_OK): Likewise.
307 (TRACE1_FIELD_VALUE): Likewise.
308 (CHECK_FIELD): Likewise.
309 (CHECK_FIELD2): Likewise.
310 (CHECK_LABEL): Likewise.
311 * util.cc (cbl_internal_error): Apply [[noreturn]] attribute.
312 * util.h (cbl_internal_error): Likewise.
313
314 2025-07-29 Rainer Orth <[email protected]>
315
316 Backported from master:
317 2025-07-11 Rainer Orth <[email protected]>
318
319 PR cobol/120621
320 * lexio.cc (parse_replace_pairs): Cast mfile.lineno() to fmt_size_t.
321 * parse.y (intrinsic): Print ptrdiff_t using %ld, cast arg to long.
322 * scan_ante.h (numstr_of): Print nx using %ld, cast arg to long.
323 * util.cc (cbl_field_t::report_invalid_initial_value): Print
324 ptrdiff_t using %ld, cast arg to long.
325
326 2025-07-29 James K. Lowden <[email protected]>
327
328 Backported from master:
329 2025-07-10 James K. Lowden <[email protected]>
330
331 PR cobol/120765
332 * cdf.y: Extend grammar for new CDF syntax, relocate dictionary.
333 * cdfval.h (cdf_dictionary): Use new CDF dictionary.
334 * dts.h: Remove useless assignment, note incorrect behavior.
335 * except.cc: Remove obsolete EC state.
336 * gcobol.1: Document CDF in its own section.
337 * genapi.cc (parser_statement_begin): Use new EC state function.
338 (parser_file_merge): Same.
339 (parser_check_fatal_exception): Same.
340 * genutil.cc (get_and_check_refstart_and_reflen): Same.
341 (get_depending_on_value_from_odo): Same.
342 (get_data_offset): Same.
343 (process_this_exception): Same.
344 * lexio.cc (check_push_pop_directive): New function.
345 (check_source_format_directive): Restrict regex search to 1 line.
346 (cdftext::free_form_reference_format): Use new function.
347 * parse.y: Define new CDF tokens, use new CDF state.
348 * parse_ante.h (cdf_tokens): Use new CDF state.
349 (redefined_token): Same.
350 (class prog_descr_t): Remove obsolete CDF state.
351 (class program_stack_t): Same.
352 (current_call_convention): Same.
353 * scan.l: Recognize new CDF tokens.
354 * scan_post.h (is_cdf_token): Same.
355 * symbols.h (cdf_current_tokens): Change current_call_convention to return void.
356 * token_names.h: Regenerate.
357 * udf/stored-char-length.cbl: Use new PUSH/POP CDF functionality.
358 * util.cc (class cdf_directives_t): Define cdf_directives_t.
359 (current_call_convention): Same.
360 (cdf_current_tokens): Same.
361 (cdf_dictionary): Same.
362 (cdf_enabled_exceptions): Same.
363 (cdf_push): Same.
364 (cdf_push_call_convention): Same.
365 (cdf_push_current_tokens): Same.
366 (cdf_push_dictionary): Same.
367 (cdf_push_enabled_exceptions): Same.
368 (cdf_push_source_format): Same.
369 (cdf_pop): Same.
370 (cdf_pop_call_convention): Same.
371 (cdf_pop_current_tokens): Same.
372 (cdf_pop_dictionary): Same.
373 (cdf_pop_enabled_exceptions): Same.
374 (cdf_pop_source_format): Same.
375 * util.h (cdf_push): Declare cdf_directives_t.
376 (cdf_push_call_convention): Same.
377 (cdf_push_current_tokens): Same.
378 (cdf_push_dictionary): Same.
379 (cdf_push_enabled_exceptions): Same.
380 (cdf_push_source_format): Same.
381 (cdf_pop): Same.
382 (cdf_pop_call_convention): Same.
383 (cdf_pop_current_tokens): Same.
384 (cdf_pop_dictionary): Same.
385 (cdf_pop_source_format): Same.
386 (cdf_pop_enabled_exceptions): Same.
387
388 2025-07-29 Robert Dubner <[email protected]>
389
390 Backported from master:
391 2025-07-09 Robert Dubner <[email protected]>
392 James K. Lowden <[email protected]>
393
394 PR cobol/120765
395 PR cobol/119337
396 PR cobol/120794
397 * Make-lang.in: Take control of the .cc.o rule.
398 * cbldiag.h (error_msg_direct): New declaration.
399 (gcc_location_dump): Forward declaration.
400 (location_dump): Use gcc_location_dump.
401 * cdf.y: Change some tokens.
402 * gcobc: Change dialect handling.
403 * genapi.cc (parser_call_targets_dump): Temporarily remove from service.
404 (parser_compile_dcls): Combine temporary arrays.
405 (get_binary_value_from_float): Apply const to one parameter.
406 (depending_on_value): Localize a boolean variable.
407 (normal_normal_compare): Likewise.
408 (cobol_compare): Eliminate cppcheck warning.
409 (combined_name): Apply const to an input parameter.
410 (parser_perform): Apply const to a variable.
411 (parser_accept): Improve handling of special_name_t parameter and
412 the exception conditions.
413 (parser_display): Improve handling of speciat_name_t parameter; use the
414 os_filename[] string when appropriate.
415 (program_end_stuff): Rename shadowing variable.
416 (parser_division): Consolidate temporary char[] arrays.
417 (parser_file_start): Apply const to a parameter.
418 (inspect_replacing): Likewise.
419 (parser_program_hierarchy): Rename shadowing variable.
420 (mh_identical): Apply const to parameters.
421 (float_type_of): Likewise.
422 (picky_memcpy): Likewise.
423 (mh_numeric_display): Likewise.
424 (mh_little_endian): Likewise.
425 (mh_source_is_group): Apply static to a variable it.
426 (move_helper): Quiet a cppcheck warning.
427 * genapi.h (parser_accept): Add exceptions to declaration.
428 (parser_accept_under_discussion): Add declaration.
429 (parser_display): Change to std::vector; add exceptions to declaration.
430 * lexio.cc (cdf_source_format): Improve source code location handling.
431 (source_format_t::infer): Likewise.
432 (is_fixed_format): Likewise.
433 (is_reference_format): Likewise.
434 (left_margin): Likewise.
435 (right_margin): Likewise.
436 (cobol_set_indicator_column): Likewise.
437 (include_debug): Likewise.
438 (continues_at): Likewise.
439 (indicated): Likewise.
440 (check_source_format_directive): Likewise.
441 (cdftext::free_form_reference_format): Likewise.
442 * parse.y: Tokens; program and function names; DISPLAY and ACCEPT
443 handling.
444 * parse_ante.h (class tokenset_t): Removed.
445 (class current_tokens_t): Removed.
446 (field_of): Removed.
447 * scan.l: Token handling.
448 * scan_ante.h (level_found): Comment.
449 * scan_post.h (start_condition_str): Remove cast author_state:.
450 * symbols.cc (symbols_update): Change error message.
451 (symbol_table_init): Correct and reorder entries.
452 (symbol_unresolved_file_key): New function definition.
453 (cbl_file_key_t::deforward): Change error message.
454 * symbols.h (symbol_unresolved_file_key): New declaration.
455 (keyword_tok): New function.
456 (redefined_token): New function.
457 (class current_tokens_t): New class.
458 * symfind.cc (symbol_match): Revise error message.
459 * token_names.h: Reorder and change numbers in comments.
460 * util.cc (class cdf_directives_t): New class.
461 (cobol_set_indicator_column): New function.
462 (cdf_source_format): New function.
463 (gcc_location_set_impl): Improve column handling in token_location.
464 (gcc_location_dump): New function.
465 (class temp_loc_t): Modify constructor.
466 (error_msg_direct): New function.
467 * util.h (class source_format_t): New class.
468
469 2025-07-29 James K. Lowden <[email protected]>
470
471 Backported from master:
472 2025-07-01 James K. Lowden <[email protected]>
473
474 * Make-lang.in: Use && instead of semicolon between commands.
475
476 2025-07-29 Robert Dubner <[email protected]>
477
478 Backported from master:
479 2025-07-01 Robert Dubner <[email protected]>
480
481 * parse.y: printf() of size_t is %zu, not %ld.
482
483 2025-07-29 James K. Lowden <[email protected]>
484
485 Backported from master:
486 2025-06-30 James K. Lowden <[email protected]>
487
488 PR cobol/120772
489 PR cobol/120779
490 PR cobol/120790
491 PR cobol/120791
492 PR cobol/120794
493 * gcobc: Supply -fPIC for shared objects.
494 * genapi.cc (linemap_add): Delete empty macro.
495 (parser_enter_file): Do not call linemap_add.
496 (parser_leave_file): Same.
497 * gengen.cc (location_from_lineno): Remove function.
498 * lexio.cc (parse_replacing_term): Allow empty term.
499 (cdftext::process_file): Always append to output.
500 (cdftext::segment_line): Output #line directives.
501 * lexio.h (struct span_t): Count lines in span.
502 * parse.y: Revamp REPOSITORY, and minor syntax extensions.
503 * parse_ante.h (input_file_status_notify): Update linemap filename before location.
504 (intrinsic_token_of): Declare.
505 (parser_move_carefully): Support MOVE pointer.
506 * parse_util.h (intrinsic_token_of): New function.
507 * scan.l: New EOF logic, accept NOT=, own yylloc and yylineno.
508 * scan_ante.h (class enter_leave_t): Do not store newline count.
509 (cdf_location_set): Remove declaration.
510 (ydfltype_of): New function.
511 (update_location): Accept location parameter.
512 (reset_location): New function.
513 (YY_USER_ACTION): Use update_location().
514 (YY_USER_INIT): Update CDF location.
515 (verify_ws): New function.
516 (wait_for_the_child): Removed.
517 * symbols.h (cobol_fileline_set): return line number.
518 * util.cc (valid_move): Use range-based for loop.
519 (struct input_file_t): Remove line_map pointer.
520 (class unique_stack): New peek() member function.
521 (cobol_lineno_save): Rename to overload cobol_lineno().
522 (cobol_lineno): Replaces cobol_lineno_save().
523 (cobol_filename): Return void.
524 (location_from_lineno): New function used by genapi.cc.
525 (cdf_location_set): Remove.
526 (matched_length): No change.
527 (cobol_fileline_set): Return line number.
528 (fisspace): Remove extra semicolon.
529 (fisprint): Same.
530 * util.h (cobol_filename_restore): Return void.
531 (cobol_lineno_save): Remove declaration.
532 (cobol_lineno): Declare.
533
534 2025-07-29 Robert Dubner <[email protected]>
535
536 Backported from master:
537 2025-06-29 Robert Dubner <[email protected]>
538
539 * Make-lang.in: Incorporate gcobol.clean.
540 * except.cc (cbl_enabled_exceptions_t::dump): Update debug message.
541 * genapi.cc (gg_attribute_bit_get): Formatting.
542 (file_static_variable): Formatting.
543 (trace1_init): Formatting.
544 (build_main_that_calls_something): Normalize function_decl use.
545 (parser_call_target): Likewise.
546 (set_call_convention): Likewise.
547 (parser_call_target_convention): Likewise.
548 (parser_call_targets_dump): Likewise.
549 (function_handle_from_name): Likewise.
550 (function_pointer_from_name): Likewise.
551 (parser_initialize_programs): Likewise.
552 (parser_statement_begin): Formatting.
553 (parser_leave_file): Use function_decl FIFO.
554 (enter_program_common): Normalize function_decl use.
555 (parser_enter_program): Normalize function_decl use.
556 (tree_type_from_field_type): Normalize function_decl use.
557 (is_valuable): Comment.
558 (pe_stuff): Change name to program_end_stuff.
559 (program_end_stuff): Likewise.
560 (parser_exit): Likewise.
561 (parser_division): Normalize function_decl use.
562 (create_and_call): Normalize function_decl use.
563 (parser_call): Normalize function_decl use.
564 (parser_set_pointers): Normalize function_decl use.
565 (parser_program_hierarchy): Normalize function_decl use.
566 (psa_FldLiteralA): Defeat attempt to re-use literals. (Fails on some aarch64).
567 (parser_symbol_add): Error message formatting.
568 * genapi.h: Formatting.
569 * gengen.cc (struct cbl_translation_unit_t): Add function_decl FIFO.
570 (show_type): Rename to gg_show_type.
571 (gg_show_type): Correct an error message.
572 (gg_assign): Formatting; change error handling.
573 (gg_modify_function_type): Normalize function_decl use.
574 (gg_define_function_with_no_parameters): Fold into gg_defint_function().
575 (function_decl_key): Normalize function_decl use.
576 (gg_peek_fn_decl): Normalize function_decl use.
577 (gg_build_fn_decl): Normalize function_decl use.
578 (gg_define_function): Normalize function_decl use.
579 (gg_tack_on_function_parameters): Remove.
580 (gg_finalize_function): Normalize function_decl use.
581 (gg_leaving_the_source_code_file): Normalize function_decl use.
582 (gg_call_expr_list): Normalize function_decl use.
583 (gg_trans_unit_var_decl): Normalize function_decl use.
584 (gg_insert_into_assemblerf): New function; formatting.
585 * gengen.h (struct gg_function_t): Eliminate "is_truly_nested" flag.
586 (gg_assign): Incorporate return value.
587 (gg_define_function): Normalize function_decl use.
588 (gg_define_function_with_no_parameters): Eliminate.
589 (gg_build_fn_decl): Normalize function_decl use.
590 (gg_peek_fn_decl): Normalize function_decl use.
591 (gg_modify_function_type): Normalize function_decl use.
592 (gg_call_expr_list): Normalize function_decl use.
593 (gg_get_function_decl): Normalize function_decl use.
594 (location_from_lineno): Prefix with "extern".
595 (gg_open): Likewise.
596 (gg_close): Likewise.
597 (gg_get_indirect_reference): Likewise.
598 (gg_insert_into_assembler): Likewise.
599 (gg_insert_into_assemblerf): Likewise.
600 (gg_show_type): New declaration.
601 (gg_leaving_the_source_code_file): New declaration.
602 * parse.y: Format debugging message.
603 * parse_ante.h: Normalize function_decl use.
604
605 2025-07-29 James K. Lowden <[email protected]>
606
607 Backported from master:
608 2025-06-20 James K. Lowden <[email protected]>
609
610 PR cobol/120621
611 * genapi.cc (parser_compile_ecs): Cast argument to unsigned long.
612 (parser_compile_dcls): Same.
613 (parser_division): RAII.
614 (inspect_tally): Cast argument to unsigned long.
615 * lexio.cc (cdftext::lex_open): Cast pid_t to long.
616 * parse.y: hard-code values for old versions of Bison, and message format.
617 * scan_ante.h (wait_for_the_child): Cast pid_t to long.
618
619 2025-07-29 James K. Lowden <[email protected]>
620
621 Backported from master:
622 2025-06-18 James K. Lowden <[email protected]>
623
624 PR cobol/120621
625 * cbldiag.h (yyerror): Add diagnostic attributes.
626 (yywarn): Same.
627 (error_msg): Same.
628 (yyerrorvl): Same.
629 (cbl_unimplementedw): Same.
630 (cbl_unimplemented): Same.
631 (cbl_unimplemented_at): Same.
632 * cdf-copy.cc (copybook_elem_t::open_file): Supply string argument.
633 * cdf.y: Use %<%>.
634 * cobol-system.h (if): Check GCC_VERSION.
635 (ATTRIBUTE_GCOBOL_DIAG): Define.
636 * except.cc (cbl_enabled_exception_t::dump): Remove extra %s.
637 * genapi.cc (get_class_condition_string): Use acceptable message.
638 (get_bytes_needed): Same.
639 (move_tree): Same.
640 (get_string_from): Same.
641 (internal_perform_through): Same.
642 (tree_type_from_field_type): Same.
643 (is_valuable): Same.
644 (parser_logop): Same.
645 (parser_relop): Same.
646 (parser_relop_long): Same.
647 (parser_if): Same.
648 (parser_setop): Same.
649 (parser_perform_conditional): Same.
650 (parser_file_add): Same.
651 (parser_file_open): Same.
652 (parser_file_close): Same.
653 (parser_file_read): Same.
654 (parser_file_write): Same.
655 (inspect_replacing): Same.
656 (parser_sort): Same.
657 (parser_file_sort): Same.
658 (parser_file_merge): Same.
659 (create_and_call): Same.
660 (parser_bitop): Same.
661 (parser_bitwise_op): Same.
662 (hijack_for_development): Same.
663 (mh_source_is_literalN): Same.
664 (mh_dest_is_float): Same.
665 (parser_symbol_add): Same.
666 * gengen.cc (show_type): Use acceptable message.
667 (gg_find_field_in_struct): Same.
668 (gg_declare_variable): Same.
669 (gg_printf): Same.
670 (gg_fprintf): Same.
671 (gg_tack_on_function_parameters): Same.
672 (gg_define_function): Same.
673 (gg_get_function_decl): Same.
674 (gg_finalize_function): Same.
675 (gg_call_expr): Same.
676 (gg_call): Same.
677 (gg_insert_into_assembler): Define new function.
678 (gg_insert_into_assemblerf): Use gg_insert_into_assembler().
679 * gengen.h (gg_insert_into_assembler): Simpler function declaration.
680 (gg_insert_into_assemblerf): Declare new function.
681 * genmath.cc (parser_op): Use acceptable message.
682 * genutil.cc (get_binary_value): Use acceptable message.
683 * lexio.cc (parse_replacing_pair): Correct diagnostic arguments.
684 (preprocess_filter_add): Same.
685 (cdftext::open_input): Same.
686 * parse.y: Use acceptable messages.
687 * parse_ante.h (struct evaluate_elem_t): Use %<%>.
688 (is_callable): Same.
689 * parse_util.h (intrinsic_invalid_parameter): Use %qs.
690 * scan.l: Use dialect_error().
691 * scan_ante.h (numstr_of): Use %qs.
692 (scanner_token): Quote COBOL tokens in messages.
693 (scanner_parsing): Correct diagnostic message.
694 (scanner_parsing_toggle): Quote COBOL tokens in messages.
695 (scanner_parsing_pop): Same.
696 (typed_name): Use %qs.
697 * scan_post.h (prelex): Quote COBOL tokens in message.
698 * show_parse.h (CHECK_FIELD): Use acceptable message format.
699 (CHECK_LABEL): Same.
700 * symbols.cc (symbol_field_same_as): Remove extra spaces.
701 (cbl_alphabet_t::assign): Use %<%>.
702 (cbl_field_t::internalize): Quote library name in message.
703 * symbols.h (struct os_locale_t): Constify codeset.
704 (class temporaries_t): Add copy constructor.
705 (struct cbl_alphabet_t): Use acceptable message.
706 * util.cc (symbol_type_str): Use cbl_internal_error.
707 (cbl_field_type_str): Same.
708 (is_elementary): Same.
709 (cbl_field_t::report_invalid_initial_value): Use %qs.
710 (class unique_stack): Avoid %m.
711 (ydferror): Declare function with attributes.
712 (error_msg): Same.
713 (cobol_fileline_set): Use %<%>.
714 (os_locale_t): Remove use of xstrdup.
715 (cobol_parse_files): Quote C names in message.
716 (dialect_error): Use %<%>.
717 * util.h (cbl_message): Add attributes.
718 (cbl_internal_error): Same.
719 (cbl_err): Same.
720 (cbl_errx): Same.
721
722 2025-07-29 James K. Lowden <[email protected]>
723
724 Backported from master:
725 2025-06-16 James K. Lowden <[email protected]>
726
727 PR cobol/120621
728 * Make-lang.in: Use STRICT_WARN.
729 * cbldiag.h (location_dump): suppress shadowVariable.
730 * cdf-copy.cc (esc): Fix shadowVariable.
731 (copybook_elem_t::open_file): Do not use %m.
732 * cdf.y: suppress invalidPrintfArgType for target format.
733 * cdfval.h (struct cdfval_t): Suppress noExplicitConstructor.
734 * cobol1.cc (cobol_name_mangler): Use C++ cast.
735 * copybook.h (class copybook_elem_t): Same.
736 * dts.h: Fixes and suppressions due to cppcheck.
737 * except.cc (cbl_enabled_exceptions_t::status): Suppress useStlAlgorithm.
738 (cbl_enabled_exceptions_t::turn_on_off): Const parameter.
739 (class choose_declarative): Removed.
740 * genapi.cc (struct called_tree_t): Explicit constructor.
741 (parser_compile_ecs): Cast to void * for %p.
742 (parser_compile_dcls): Same.
743 (parser_statement_begin): Same.
744 (initialize_variable_internal): Use std::vector for subscripts.
745 (parser_initialize): Constification.
746 (get_string_from): Same.
747 (combined_name): Same.
748 (parser_perform): Same.
749 (psa_FldLiteralN): Same.
750 (is_figconst): Const parameter.
751 (is_figconst_t): Same.
752 (parser_exit): Same.
753 (parser_division): Const pointer.
754 (parser_perform_conditional): Whitespace.
755 (parser_set_conditional88): Const parameter.
756 (inspect_tally): Use std::vector.
757 (inspect_replacing): Same.
758 (parser_inspect): Same.
759 (parser_intrinsic_subst): Use std::vector (constuct elements).
760 (parser_intrinsic_call_1): Use std::vector for subscripts.
761 (is_ascending_key): Const pointer.
762 (parser_sort): Use std::vector.
763 (parser_file_sort): Same.
764 (parser_file_merge): Same.
765 (parser_unstring): Same.
766 (parser_string): Same.
767 (parser_call): Const pointer.
768 (parser_program_hierarchy): Use std::vector.
769 (conditional_abs): Const paraemeter.
770 (float_type_of): Same.
771 (initial_from_initial): Set value, quoted or not.
772 (parser_symbol_add): Remove redundant nested test.
773 * genapi.h (parser_add): Const parameters.
774 (parser_subtract): Same.
775 (parser_multiply): Same.
776 (parser_divide): Same.
777 (parser_perform): Same.
778 (parser_exit): Same.
779 (parser_initialize): Same.
780 (parser_set_conditional88): Same.
781 (parser_sort): Same.
782 (parser_file_sort): Same.
783 (parser_file_merge): Same.
784 (parser_string): Same.
785 (is_ascending_key): Same.
786 * genmath.cc (arithmetic_operation): Use std::vector.
787 (is_somebody_float): Const parameter.
788 (all_results_binary): Const parameter.
789 (fast_multiply): Remove redundant nested test.
790 (parser_add): Const parameter.
791 (parser_multiply): Remove redundant nested test.
792 (parser_divide): Const parameter.
793 (parser_subtract): Same.
794 * genutil.cc (get_depending_on_value): Use std::vector.
795 (get_data_offset): Same.
796 (tree_type_from_field): Const parameter.
797 (refer_has_depends): Const pointers.
798 (get_literal_string): RAII.
799 (refer_is_clean): Use std::vector.
800 (get_time_nanoseconds): Newline at EOF.
801 * genutil.h (tree_type_from_field): Remove declaration.
802 * inspect.h (struct cbx_inspect_qual_t): Use std::vector.
803 (struct cbl_inspect_qual_t): Same.
804 (struct cbx_inspect_match_t): Same.
805 (class cbl_inspect_match_t): Same.
806 (struct cbx_inspect_replace_t): Same.
807 (struct cbl_inspect_replace_t): Same.
808 (struct cbx_inspect_oper_t): Same.
809 (struct cbl_inspect_oper_t): Same.
810 (struct cbx_inspect_t): Same.
811 (struct cbl_inspect_t): Same.
812 (parser_inspect): Same.
813 * lexio.cc (indicated): Const pointer.
814 (remove_inline_comment): Scope reduction.
815 (maybe_add_space): Const pointer.
816 (recognize_replacements): C++ cast.
817 (check_source_format_directive): Same.
818 (struct replacing_term_t): Explicit constructor.
819 (parse_replace_pairs): Const reference.
820 (location_in): Const reference.
821 (parse_copy_directive): C++ cast.
822 (parse_replace_last_off): Const parameter.
823 (parse_replace_text): Const reference.
824 (parse_replace_directive): C++ cast.
825 (cdftext::lex_open): Const reference.
826 (cdftext::open_output): Scope reduction.
827 (cdftext::free_form_reference_format): Remove unused variable.
828 (cdftext::process_file): Simplify.
829 * lexio.h (struct bytespan_t): Use nullptr.
830 (struct filespan_t): Initialize icol in constructor.
831 (struct span_t): Suppress confused operatorEqRetRefThis.
832 (struct replace_t): Eliminate single-value constructor.
833 * parse.y: Many const cppcheck reports, and portable bit-shift.
834 * parse_ante.h (reject_refmod): Const parameter.
835 (require_pointer): Same.
836 (require_integer): Same.
837 (struct evaluate_elem_t): Explicit constructor.
838 (struct arith_t): Use std::vector.
839 (class eval_subject_t): Const parameter.
840 (dump_inspect_match): Declare.
841 (struct perform_t): Explicit constructor.
842 (list_add): Const parameter.
843 (class tokenset_t): Avoid negative array index.
844 (struct file_list_t): Explicit constructor.
845 (struct field_list_t): Same.
846 (struct refer_list_t): Same.
847 (struct refer_marked_list_t): Const parameter.
848 (struct refer_collection_t): Explicit constructor.
849 (struct ast_inspect_oper_t): Remove class.
850 (ast_inspect_oper_t): Same.
851 (struct ast_inspect_t): Same.
852 (struct ast_inspect_list_t): Same.
853 (ast_inspect): Add location.
854 (struct elem_list_t): Explicit constructor.
855 (struct unstring_tgt_t): Same.
856 (struct unstring_tgt_list_t): Same.
857 (struct unstring_into_t): Same.
858 (struct ffi_args_t): Same.
859 (struct file_sort_io_t): Same.
860 (merge_t): Same.
861 (struct vargs_t): Same.
862 (class prog_descr_t): Eliminate single-value constructor.
863 (class program_stack_t): Suppress useStlAlgorithm.
864 (struct rel_part_t): Eliminate single-value constructor.
865 (class log_expr_t): Explicit constructor.
866 (add_debugging_declarative): Rename local variable.
867 (intrinsic_call_2): Const parameter.
868 (invalid_key): Use std::find_if.
869 (parser_add2): Const parameter.
870 (parser_subtract2): Same.
871 (stringify): Same.
872 (unstringify): Same.
873 (anybody_redefines): Same.
874 (ast_call): Same.
875 * parse_util.h (class cname_cmp): Explicit constructor.
876 (intrinsic_inconsistent_parameter): Same.
877 * scan_ante.h (struct cdf_status_t): Eliminate single-value constructor.
878 (class enter_leave_t): Explicit constructor.
879 (update_location): Const pointer, explicit constructor.
880 (symbol_function_token): Const pointer.
881 (typed_name): Same.
882 * scan_post.h (datetime_format_of): Scope reduction.
883 * show_parse.h (class ANALYZE): Use std::vector, explicit consstructor.
884 * symbols.cc (symbol_table_extend): Scope reduction.
885 (cbl_ffi_arg_t::cbl_ffi_arg_t): Define default constructor.
886 (end_of_group): Const pointer.
887 (symbol_find_odo): Const parameter.
888 (rename_not_ok): Same.
889 (field_str): Use %u instead of %d.
890 (struct capacity_of): Const pointer.
891 (symbols_update): Same.
892 (symbol_field_parent_set): Same.
893 (symbol_file_add): Same.
894 (symbol_typedef_add): Same.
895 (symbol_field_add): Use new operator=().
896 (symbol_field): Suppress CastIntegerToAddressAtReturn.
897 (symbol_register): Same.
898 (symbol_file): Suppress knownConditionTrueFalse.
899 (next_program): Const parameter.
900 (symbol_file_record): Same.
901 (class is_section): Explicit constructor.
902 (cbl_file_t::no_key): Remove.
903 (cbl_prog_hier_t::cbl_prog_hier_t): Use std::vector.
904 (symbol_label_add): Assert pointer is not NULL.
905 (symbol_label_section_exists): Const reference in lambda.
906 (expand_picture): Use C++ cast.
907 (symbol_program_callables): Const pointer.
908 (symbol_currency_add): Suppress nullPointerRedundantCheck.
909 (cbl_key_t): Use std::vector.
910 (cbl_occurs_t::field_add): Const parameter.
911 (cbl_occurs_t::index_add): Explicit constructor.
912 (class is_field_at): Same.
913 (cbl_file_key_t::deforward): Scope reduction.
914 (cbl_file_t::keys_str): Use allocated memory only.
915 (file_status_status_of): Const pointer.
916 (is_register_field): Const parameter.
917 * symbols.h (struct cbl_field_data_t): Eliminate single-value constructor.
918 (struct cbl_occurs_bounds_t): Same.
919 (struct cbl_refer_t): Use std::vector.
920 (valid_move): Const parameter.
921 (is_register_field): Same.
922 (struct cbl_key_t): Use std::vector.
923 (struct cbl_substitute_t): Eliminate single-value constructor.
924 (refer_of): Return const reference
925 (struct cbl_ffi_arg_t): Eliminate single-value constructor.
926 (class temporaries_t): Same.
927 (struct cbl_file_key_t): Define default constructor.
928 (struct cbl_file_lock_t): Define copy constructor and operator=().
929 (struct cbl_file_t): Complete default constructor.
930 (struct symbol_elem_t): Explicit constructor.
931 (symbol_elem_of): Suppress cstyleCast.
932 (symbol_redefines): Const parameter.
933 (struct cbl_field_t): Same.
934 (cbl_section_of): Test for NULL pointer.
935 (cbl_field_of): Same.
936 (cbl_label_of): Same.
937 (cbl_special_name_of): Same.
938 (cbl_alphabet_of): Same.
939 (cbl_file_of): Same.
940 (is_figconst): Delete extra "struct" keyword.
941 (is_figconst_low): Same.
942 (is_figconst_zero): Same.
943 (is_figconst_space): Same.
944 (is_figconst_quote): Same.
945 (is_figconst_high): Same.
946 (is_space_value): Same.
947 (is_quoted): Same.
948 (symbol_index): Const parameter.
949 (struct cbl_prog_hier_t): Suppress noExplicitConstructor.
950 (struct cbl_perform_vary_t): Eliminate single-value constructor.
951 (is_signable): Const parameter.
952 (is_temporary): Same.
953 (rename_not_ok): Same.
954 (field_at): Test for NULL pointer.
955 (class procref_base_t): Eliminate single-value constructor.
956 * symfind.cc (is_data_field): Const pointer.
957 (finalize_symbol_map2): Same.
958 (class in_scope): Same.
959 (symbol_match2): Same.
960 * token_names.h: Suppress useInitializationList.
961 * util.cc (normalize_picture): Whitespace and remove extra "continue".
962 (redefine_field): Const pointer.
963 (cbl_field_t::report_invalid_initial_value): Same.
964 (literal_subscript_oob): Rename shadow variable.
965 (cbl_refer_t::subscripts_set): Use std::vector.
966 (cbl_refer_t::str): Same.
967 (cbl_refer_t::deref_str): Same.
968 (locally_unique): Use explicit constructor.
969 (ambiguous_reference): Same.
970 (class unique_stack): Use const reference.
971 (cobol_filename): Const pointer.
972 (verify_format): Scope reduction.
973 (class temp_loc_t): Do not derive from YYLTYPE.
974 (cobol_parse_files): Const pointer.
975 * util.h (as_voidp): Define convenient converter.
976
977 2025-07-29 James K. Lowden <[email protected]>
978
979 Backported from master:
980 2025-06-10 James K. Lowden <[email protected]>
981
982 * Make-lang.in: cobol.clean does not remove libgcobol files.
983 * cdf.y: Suppress 1 cppcheck false positive.
984 * cdfval.h (scanner_parsing): Partial via cppcheck for PR119324.
985 * gcobol.1: Fix groff errors.
986 * gcobolspec.cc (append_arg): Const parameter.
987 * parse_ante.h (intrinsic_call_2): Avoid NULL dereference.
988
989 2025-07-29 Robert Dubner <[email protected]>
990
991 Backported from master:
992 2025-06-06 Robert Dubner <[email protected]>
993 James K. Lowden <[email protected]>
994
995 PR cobol/120328
996 PR cobol/119695
997 * Make-lang.in: Success with non-English locale.
998 * cbldiag.h (cbl_unimplemented_at): Comment:
999 * cdf-copy.cc (copybook_elem_t::open_file): Indentation.
1000 * cdf.y: YYABORT on certain errors.
1001 * cdfval.h (cdf_value): Const parameter.
1002 * copybook.h (class copybook_elem_t): Initialization.
1003 (class uppername_t): Explicit constructor.
1004 * except.cc (ec_type_descr): Remove %04s.
1005 (cbl_enabled_exceptions_t::dump): Remove %zu.
1006 * exceptg.h (class exception_turn_t): Explicit constructor.
1007 * genapi.cc (parser_perform_conditional): Remove %zu.
1008 (set_exception_environment): Formatting.
1009 (parser_statement_begin): Exception overhead.
1010 (parser_perform_conditional): Formatting:
1011 (parser_perform_conditional_end): Eliminate size_t.
1012 (parser_check_fatal_exception): Exception overhead.
1013 (parser_perform_conditional_end): Remove %zu.
1014 * inspect.h (struct cbx_inspect_match_t): Const reference.
1015 (struct cbx_inspect_t): Const parameter.
1016 * lexio.cc (cdftext::process_file): Remove %zu.
1017 * lexio.h (struct YYLTYPE): Remove unneeded struct.
1018 (YYLTYPE_IS_DECLARED): Likewise.
1019 (YYLTYPE_IS_TRIVIAL): Likewise.
1020 * parse.y: Comment; change DOT.
1021 * scan.l: Scan function names without swallowing whitespace.
1022 * scan_ante.h (scanner_parsing): Remove %zu.
1023 (scanner_parsing_pop): Remove %zu.
1024 (binary_integer_usage): Remove %zu.
1025 * scan_post.h (prelex): Correct post-CDF resumption.
1026 (yylex): Clearer message.
1027 * symbols.cc (symbol_table_extend): Explicit constructor.
1028 (elementize): Const parameter.
1029 (is_variable_length): Correct always-false.
1030 (symbols_update): Remove unnecessary shadow variable.
1031 (struct symbol_elem_t): Const parameter.
1032 (symbol_alphabet_add): Const parameter.
1033 (new_literal_add): Initialization.
1034 * symbols.h (class cbl_domain_elem_t): Correct assignment.
1035 (struct cbl_span_t): Improve constructor.
1036 (struct cbl_refer_t): Initialization.
1037 (struct cbl_alphabet_t): Rename shadow variable.
1038 (struct cbl_file_key_t): Remove unused constructor.
1039 (struct symbol_elem_t): Initialization.
1040 (struct cbl_until_addresses_t): Use unsigned int, for messages.
1041 (struct cbl_prog_hier_t): Initialization.
1042 (struct cbl_perform_tgt_t): Repair constructor.
1043 (struct cbl_label_t): Const parameter.
1044 (symbol_typedef_add): Const parameter.
1045 (symbol_field_add): Explicit constructor.
1046 (symbol_label_add): Explicit constructor.
1047 (symbol_program_add): Remove C-style "struct" use.
1048 (symbol_special_add): Remove C-style "struct" use.
1049 (symbol_alphabet_add): Const parameter.
1050 (symbol_file_add): Remove C-style "struct" use.
1051 (symbol_section_add): Remove C-style "struct" use.
1052 * symfind.cc: Const parameter.
1053 * util.cc (gb4): New function.
1054 * util.h (gb4): New function.
1055 * TODO: New file.
1056
1057 2025-07-29 Robert Dubner <[email protected]>
1058
1059 Backported from master:
1060 2025-06-05 Robert Dubner <[email protected]>
1061
1062 PR cobol/119975
1063 * genapi.cc (parser_intrinsic_call_0): Use get_time_nanoseconds().
1064 * genutil.cc (get_time_64): Rename to get_time_nanoseconds().
1065 (get_time_nanoseconds): Likewise.
1066 * genutil.h (get_time_64): Likewise.
1067 (get_time_nanoseconds): Likewise.
1068 * util.cc (class cbl_timespec): Timing routine uses
1069 get_time_nanoseconds().
1070 (operator-): Likewise.
1071 (parse_file): Likewise.
1072
1073 2025-07-29 Robert Dubner <[email protected]>
1074
1075 Backported from master:
1076 2025-06-02 Robert Dubner <[email protected]>
1077
1078 PR cobol/119975
1079 * genapi.cc (parser_intrinsic_call_0): Use get_time_64() function.
1080 * genutil.cc (get_time_64): Definition created.
1081 * genutil.h (get_time_64): Declaration created.
1082
1083 2025-07-29 Robert Dubner <[email protected]>
1084
1085 Backported from master:
1086 2025-06-01 Robert Dubner <[email protected]>
1087
1088 PR cobol/119524
1089 * gengen.cc (gg_printf): Use the new __gg__fprintf_stderr() function
1090 instead of generating a call to fprintf().
1091
1092 2025-07-29 Robert Dubner <[email protected]>
1093
1094 Backported from master:
1095 2025-05-20 Robert Dubner <[email protected]>
1096 James K. Lowden <[email protected]>
1097
1098 PR cobol/119770
1099 PR cobol/119772
1100 PR cobol/119790
1101 PR cobol/119771
1102 PR cobol/119810
1103 PR cobol/119335
1104 PR cobol/119632
1105 * cdf-copy.cc (GLOB_BRACE): Eliminate <glob.h>.
1106 * cdfval.h (_CDF_VAL_H_): Switch to C++ headers.
1107 * copybook.h (class copybook_elem_t): Eliminate <glob.h>.
1108 (class copybook_t): Likewise.
1109 * gcobc: Numerous changes to improve utility.
1110 * gcobol.1: Correct names in the list of functions.
1111 * genapi.cc (compare_binary_binary): Use has_attr() function.
1112 * lexio.cc (cdftext::lex_open): Typo; filename logic.
1113 (cdftext::process_file): Filename logic.
1114 * parse.y: Numerous parsing changes.
1115 * parse_ante.h (new_alphanumeric): C++ includes; changes to temporaries.
1116 (new_tempnumeric): Likewise.
1117 (new_tempnumeric_float): Likewise.
1118 (set_real_from_capacity): Created.
1119 * scan.l: Use yy_pop_state().
1120 * scan_ante.h (typed_name): Find figconst from data.initial.
1121 * symbols.cc (symbol_valid_udf_args): Eliminate.
1122 (symbols_update): figconst processing.
1123 (new_temporary_impl): For functions, set .initial to function name.
1124 (temporaries_t::acquire): Likewise.
1125 (new_alphanumeric): Likewise.
1126 (new_temporary): Likewise.
1127 * symbols.h (_SYMBOLS_H_): Use C++ includes.
1128 (cbl_figconst_tok): Change handling of figconst.
1129 (cbl_figconst_field_of): Change handling of figconst.
1130 (symbol_valid_udf_args): Eliminate.
1131 * symfind.cc (symbol_match2): Change declaration.
1132 (symbol_match): Change declaration.
1133
1134 2025-07-29 Mark Wielaard <[email protected]>
1135
1136 Backported from master:
1137 2025-05-18 Mark Wielaard <[email protected]>
1138
1139 * lang.opt.urls: Regenerated.
1140
1141 2025-07-29 Robert Dubner <[email protected]>
1142
1143 Backported from master:
1144 2025-05-16 Robert Dubner <[email protected]>
1145
1146 * cobol1.cc (cobol_langhook_handle_option): Eliminate OPT_M.
1147 * except.cc (cbl_enabled_exception_t::dump): Formatting.
1148 (symbol_declaratives_add): Remove.
1149 (declarative_runtime_match): Change to no-blob processing.
1150 * exceptg.h (declarative_runtime_match): Change declaration.
1151 (symbol_declaratives_add): Remove declaration.
1152 * gcobc: Dialect handling.
1153 * genapi.cc (parser_compile_ecs): Formatting; add SHOW_IF_PARSE.
1154 (parser_compile_dcls): Likewise.
1155 (parser_statement_begin): Avoid unnecessary store_location_stuff() call.
1156 (gg_get_depending_on_value): Streamline get_depending_on_value_from_odo().
1157 (depending_on_value): Likewise.
1158 (parser_display_field): Formatting.
1159 (parser_display): Handle case ENV_NAME_e.
1160 (parser_file_open): Avoid unnecessary store_location_stuff.
1161 (parser_file_close): Likewise.
1162 (parser_file_read): Likewise.
1163 (parser_file_write): Likewise.
1164 (parser_file_delete): Likewise.
1165 (parser_file_rewrite): Likewise.
1166 (parser_file_start): Likewise.
1167 (parser_intrinsic_subst): Streamline get_depending_on_value_from_odo().
1168 (parser_intrinsic_call_1): Likewise.
1169 (parser_lsearch_start): Likewise.
1170 (parser_bsearch_start): Likewise.
1171 (parser_sort): Likewise.
1172 (store_location_stuff): Avoid unnecessary assignments.
1173 (parser_pop_exception): Formatting.
1174 * genmath.cc (parser_add): Avoid var_decl_default_compute_error assignment
1175 when doing fast_add().
1176 (parser_subtract): Likewise.
1177 * genutil.cc (REFER): Macro for analyzing code generation.
1178 (get_integer_value): Use data_decl_node for integer value from FldLiteralN.
1179 (get_data_offset): Streamline exception code processing.
1180 (get_and_check_refstart_and_reflen): Likewise.
1181 (get_depending_on_value_from_odo): Likewise.
1182 (get_depending_on_value): Likewise.
1183 (refer_is_clean): Formatting.
1184 (refer_refmod_length): Streamline exception code processing.
1185 (refer_fill_depends): Likewise.
1186 (refer_offset): Likewise.
1187 (refer_size_dest): Likewise.
1188 (refer_size_source): Likewise.
1189 * genutil.h (get_depending_on_value_from_odo): Likewise.
1190 * lang-specs.h: Options definition.
1191 * lang.opt: -M as in c.opt.
1192 * lexio.h: Formatting.
1193 * parse.y: Expand -dialect suggestions; SECTION SEGMENT messages.
1194 * parse_ante.h (declarative_runtime_match): Dialect handling.
1195 (labels_dump): Likewise.
1196 (class current_tokens_t): Likewise.
1197 (class prog_descr_t): Make program_index size_t to prevent padding bytes.
1198 * scan.l: POP_FILE directive.
1199 * scan_ante.h (class enter_leave_t): Better handle line number when
1200 processing COPY statements.
1201 * symbols.cc (symbol_elem_cmp): Eliminate SymFunction.
1202 (symbols_dump): Likewise.
1203 (symbol_label_section_exists): Likewise.
1204 * symbols.h (NAME_MAX): Eliminate. (Was part of SymFunction).
1205 (dialect_is): Improve dialect handling.
1206 (dialect_gcc): Likewise.
1207 (dialect_ibm): Likewise.
1208 (dialect_gnu): Likewise.
1209 (enum symbol_type_t): Eliminate SymFunction.
1210 * util.cc (symbol_type_str): Likewise.
1211 (class unique_stack): Option -M handling.
1212 (cobol_set_pp_option): Likewise.
1213 (parse_file): Likewise.
1214 * util.h (cobol_set_pp_option): Likewise.
1215
1216 2025-07-29 Robert Dubner <[email protected]>
1217
1218 Backported from master:
1219 2025-05-10 Robert Dubner <[email protected]>
1220
1221 PR cobol/119337
1222 * Make-lang.in: Change how $(FLEX) is invoked.
1223 * cdf.y: Change parser tokens.
1224 * gcobc: Changed how name is inferred for PR119337
1225 * gcobol.1: Documentation for SOURCE format heuristic
1226 * genapi.cc: Eliminate __gg__odo_violation.
1227 (parser_display_field): Change comment.
1228 * genutil.cc:Eliminate __gg__odo_violation.
1229 (REFER): New macro for analyzing subscript/refmod calculations.
1230 (get_integer_value): Likewise.
1231 (get_data_offset): Eliminate __gg__odo_violation.
1232 (scale_by_power_of_ten_N): Eliminate unnecessary var_decl_rdigits operation.
1233 (refer_is_clean): Check for FldLiteralN.
1234 (REFER_CHECK): Eliminate.
1235 (refer_refmod_length): Streamline var_decl_rdigits processing.
1236 (refer_fill_depends): Likewise.
1237 (refer_offset): Streamline processing when FldLiteralN.
1238 (refer_size): Tag with REFER macro.
1239 (refer_size_dest): Likewise.
1240 (refer_size_source): Likewise.
1241 * genutil.h (get_integer_value): Delete declaration for odo_violation;
1242 change comment for get_integer_value
1243 (REFER_CHECK): Delete declaration.
1244 (refer_check): Delete #define.
1245 * lexio.cc (is_fixed_format): Changes for source format auto-detect.
1246 (is_reference_format): Likewise.
1247 (check_source_format_directive): Likewise.
1248 (valid_sequence_area): Likewise.
1249 (is_p): Likewise.
1250 (is_program_id): Likewise.
1251 (likely_nist_file): Likewise.
1252 (infer_reference_format): Likewise.
1253 (cdftext::free_form_reference_format): Likewise.
1254 * parse.y: Token changes.
1255 * parse_ante.h (class tokenset_t): Likewise.
1256 (class current_tokens_t): Likewise.
1257 (cmd_or_env_special_of): Likewise.
1258 * scan.l: Likewise.
1259 * scan_ante.h (bcomputable): Likewise.
1260 (keyword_alias_add): Likewise.
1261 (struct bint_t): Likewise.
1262 (binary_integer_usage): Likewise.
1263 (binary_integer_usage_of): Likewise.
1264 * scan_post.h (start_condition_str): Likewise.
1265 * symbols.cc (symbol_table_init): Formatting.
1266 * symbols.h (struct cbl_field_data_t): Add "input" method to field_data_t.
1267 (keyword_alias_add): Add forward declaration.
1268 (binary_integer_usage_of): Likewise.
1269 * token_names.h: Change list of tokens.
1270 * util.cc (iso_cobol_word): Change list of COBOL reserved words.
1271
1272 2025-07-29 Rainer Orth <[email protected]>
1273
1274 Backported from master:
1275 2025-05-08 Rainer Orth <[email protected]>
1276
1277 PR cobol/119217
1278 * symbols.h (NAME_MAX): Define fallback.
1279
1280 2025-07-29 Rainer Orth <[email protected]>
1281
1282 Backported from master:
1283 2025-05-08 Rainer Orth <[email protected]>
1284
1285 PR cobol/119217
1286 * dts.h (csub_match): Initialize rm_so, rm_eo fields explicitly.
1287
1288 2025-07-29 Rainer Orth <[email protected]>
1289
1290 Backported from master:
1291 2025-05-08 Rainer Orth <[email protected]>
1292
1293 PR cobol/119217
1294 * cdf-copy.cc (GLOB_BRACE): Define fallback.
1295 (GLOB_TILDE): Likewise.
1296
1297 2025-07-29 Robert Dubner <[email protected]>
1298
1299 Backported from master:
1300 2025-05-05 Robert Dubner <[email protected]>
1301
1302 * cdf.y: Exceptions.
1303 * except.cc (cbl_enabled_exception_t::dump): Likewise.
1304 (cbl_enabled_exceptions_t::dump): Likewise.
1305 (cbl_enabled_exceptions_t::status): Likewise.
1306 (cbl_enabled_exceptions_t::encode): Likewise.
1307 (cbl_enabled_exceptions_t::turn_on_off): Likewise.
1308 (cbl_enabled_exceptions_t::match): Likewise.
1309 (declarative_runtime_match): Likewise. Likewise.
1310 * exceptg.h (struct cbl_exception_files_t): Likewise.
1311 (class exception_turn_t): Likewise.
1312 (apply_cdf_turn): Likewise.
1313 * genapi.cc (treeplet_fill_source): Use refer_offset().
1314 (function_handle_from_name): Likewise.
1315 (parser_initialize_programs): Likewise.
1316 (parser_statement_begin): Likewise.
1317 (array_of_long_long): Exceptions.
1318 (parser_compile_ecs): Exceptions.
1319 (parser_compile_dcls): Exceptions.
1320 (store_location_stuff): Exceptions.
1321 (initialize_variable_internal): Use refer_offset().
1322 (compare_binary_binary): Use refer_offset().
1323 (cobol_compare): Use refer_offset().
1324 (paragraph_label): Formatting.
1325 (parser_goto): Use refer_offset().
1326 (parser_perform_times): Likewise.
1327 (internal_perform_through_times): Likewise.
1328 (parser_enter_file): Exceptions.
1329 (psa_FldLiteralN): Add comment.
1330 (parser_accept): Use refer_offset().
1331 (parser_accept_command_line): Likewise.
1332 (parser_accept_command_line_count): Likewise.
1333 (parser_accept_envar): Likewise.
1334 (parser_set_envar): Likewise.
1335 (parser_display_internal): Likewise.
1336 (parser_initialize_table): Likewise.
1337 (parser_sleep): Likewise.
1338 (parser_allocate): Likewise.
1339 (parser_free): Likewise.
1340 (parser_division): Likewise.
1341 (parser_relop_long): Likewise.
1342 (parser_see_stop_run): Likewise.
1343 (parser_classify): Likewise.
1344 (parser_file_add): Include symbol_table_index in __gg__file_init().
1345 (parser_file_open): Use refer_offset().
1346 (parser_file_write): Move forward declaration of store_location_stuff().
1347 (parser_file_start): Use refer_offset().
1348 (parser_inspect_conv): Likewise:
1349 (parser_intrinsic_numval_c): Likewise:
1350 (parser_intrinsic_subst): Likewise:
1351 (parser_intrinsic_call_1): Likewise:
1352 (parser_intrinsic_call_2): Likewise:
1353 (parser_intrinsic_call_3): Likewise:
1354 (parser_intrinsic_call_4): Likewise:
1355 (parser_sort): Likewise:
1356 (parser_return_start): Exceptions.
1357 (parser_unstring): Use refer_offset().
1358 (create_and_call): Likewise.
1359 (parser_set_pointers): Use refer_offset().
1360 (parser_program_hierarchy): Comment.
1361 (parser_set_handled): Exceptions; removed.
1362 (parser_set_file_number): Exceptions; removed.
1363 (stash_exceptions): Exceptions; removed.
1364 (parser_exception_prepare): Exceptions; removed.
1365 (parser_match_exception): Exceptions; eliminate blob.
1366 (parser_check_fatal_exception): Exceptions.
1367 (parser_push_exception): Create.
1368 (parser_pop_exception): Create.
1369 (mh_identical): Use refer_offset().
1370 (mh_source_is_literalN): Likewise.
1371 (mh_dest_is_float): Likewise.
1372 (mh_numeric_display): Likewise.
1373 (mh_little_endian): Likewise.
1374 (mh_source_is_group): Likewise.
1375 (move_helper): Likewise.
1376 (binary_initial_from_float128): Formatting; change error message.
1377 (initial_from_float128): Change name to "initial_from_initial"
1378 (initial_from_initial): Add one byte to allocation for figconsts.
1379 (parser_symbol_add): Use initial_from_initial().
1380 (parser_symbol_add): Eliminate unneeded logic around actually_create...
1381 * genapi.h: Exceptions.
1382 * genmath.cc (fast_add): Use refer_offset().
1383 (fast_subtract): Likewise.
1384 (fast_multiply): Likewise.
1385 (fast_divide): Likewise.
1386 * genutil.cc: Exceptions; various global definitions.
1387 (get_integer_value): Comment.
1388 (get_data_offset_dest): Eliminate.
1389 (get_data_offset_source): Rename to get_data_offset().
1390 (get_data_offset): Use refer_offset().
1391 (get_binary_value): Likewise; eliminate use of literal_decl_node.
1392 (build_array_of_treeplets): Likewise.
1393 (build_array_of_fourplets): Likewise.
1394 (REFER_CHECK): Comment:
1395 (refer_refmod_length): Use get_any_capacity(); use refer_offset;
1396 set reflen to integer_one_node.
1397 (refer_offset_dest): Change name to refer_offset.
1398 (refer_offset): Use get_data_offset().
1399 (refer_size_dest): Change name to refer_size().
1400 (refer_size): Use get_any_capacity().
1401 (refer_offset_source): Use refer_offset().
1402 (refer_size_source): Likewise.
1403 (qualified_data_source): Likewise.
1404 (qualified_data_dest): Likewise.
1405 (qualified_data_location): Likewise.
1406 * genutil.h: Exceptions; changes to global declarations.
1407 * lexio.cc (likely_nist_file): Added to detect NIST file format.
1408 (cdftext::free_form_reference_format): Handle NIST file format.
1409 * parse.y: (strip_trailing_zeroes): Added.
1410 Changes for exceptions.
1411 * parse_ante.h (parse_error_inc): Likewise.
1412 (YYLLOC_DEFAULT): Likewise.
1413 (static_cast): Likewise.
1414 (is_cobol_word): Change to is_cobol_charset.
1415 (is_cobol_charset): Refine allowed characters.
1416 (require_numeric): Change to require integer.
1417 (require_integer): Likewise.
1418 (current_enabled_ecs): Exceptions.
1419 (is_integer_literal): Change interpretation.
1420 (procedure_division_ready): Exceptions.
1421 (statement_epilog): Likewise.
1422 (statement_begin): Likewise.
1423 * show_parse.h: Changes to GCOBOL_SHOW handling.
1424 * structs.cc: Add symbol_index to cblc_file_t structure.
1425 * symbols.cc (field_str): Repair .initial handling in FldLiteralN.
1426 * symbols.h (struct cbl_field_t): Eliminate literal_decl_node.
1427 (current_enabled_ecs): Exceptions.
1428 * util.cc (cbl_message): Add final newline to error message.
1429 (ftoupper): Added.
1430 (iso_cobol_word): Add list of ISO reserved words.
1431 * util.h (ftoupper): Added.
1432
1433 2025-07-29 Jakub Jelinek <[email protected]>
1434
1435 Backported from master:
1436 2025-05-02 Jakub Jelinek <[email protected]>
1437
1438 PR cobol/119364
1439 * structs.h (cbl_enabled_exception_type_node): New variable
1440 declaration.
1441 * structs.cc (cbl_enabled_exception_type_node): New variable.
1442 (create_cbl_enabled_exception_t): New function.
1443 (create_our_type_nodes): Initialize cbl_enabled_exception_type_node
1444 using it.
1445 * genapi.cc (stash_exceptions): Don't compare padding bits to
1446 determine if the exceptions are the same as last time. Use
1447 cbl_enabled_exception_type_node for target size and field offsets
1448 and native_encode_expr to write each field into byte sequence.
1449
1450 2025-07-29 Jakub Jelinek <[email protected]>
1451
1452 Backported from master:
1453 2025-05-02 Jakub Jelinek <[email protected]>
1454
1455 PR cobol/119364
1456 * util.cc (is_numeric_edited): Use HOST_SIZE_T_PRINT_UNSIGNED
1457 instead of "%zu" and cast corresponding argument to fmt_size_t.
1458 (normalize_picture): Use GCC_PRISZ instead of "z" and pass address
1459 of fmt_size_t var to sscanf and copy afterwards.
1460 (cbl_refer_t::str): Use HOST_SIZE_T_PRINT_UNSIGNED instead of
1461 "%zu" or GCC_PRISZ instead of "z" and cast corresponding argument
1462 to fmt_size_t.
1463 (struct move_corresponding_field): Likewise.
1464 (valid_move): Likewise.
1465 (ambiguous_reference): Likewise.
1466 (parent_names): Likewise.
1467 (find_corresponding::find_corresponding): Likewise.
1468 (corresponding_fields): Likewise.
1469 (unique_stack::push): Likewise.
1470 (cobol_filename): Likewise.
1471 * lexio.cc: Include config.h first.
1472 (recognize_replacements): Use HOST_SIZE_T_PRINT_UNSIGNED instead of
1473 "%zu" or GCC_PRISZ instead of "z" and cast corresponding argument
1474 to fmt_size_t.
1475 (check_source_format_directive): Likewise.
1476 (parse_replacing_pair): Use size_t(0) instead of 0UL in span_t
1477 construction.
1478 (parse_replace_pairs): Use HOST_SIZE_T_PRINT_UNSIGNED instead of
1479 "%zu" or GCC_PRISZ instead of "z" or HOST_SIZE_T_PRINT_DEC instead
1480 of "%zd" and cast corresponding argument to fmt_size_t.
1481 (parse_copy_directive): Likewise.
1482 (parse_replace_last_off): Likewise.
1483 (parse_replace_text): Likewise.
1484 (bytespan_t::append): Likewise.
1485 (cdftext::map_file): Likewise.
1486 (cdftext::process_file): Likewise.
1487 * symfind.cc (dump_symbol_map2): Likewise.
1488 (dump_symbol_map_value): Likewise.
1489 (build_symbol_map): Likewise.
1490 (is_name::dump_key): Likewise.
1491 (symbol_match2): Likewise.
1492 (symbol_find): Likewise.
1493 (symbol_find_of): Likewise.
1494 * cdf.y: Likewise.
1495 * symbols.cc: Include config.h first.
1496 (cbl_field_t::set_attr): Return uint64_t rather than size_t
1497 and replace size_t(attr) with uint64_t(attr).
1498 (cbl_field_t::clear_attr): Likewise.
1499 (symbol_field_capacity): Use HOST_SIZE_T_PRINT_UNSIGNED instead of
1500 "%zu" or GCC_PRISZ instead of "z" or HOST_SIZE_T_PRINT_DEC instead
1501 of "%zd" and cast corresponding argument to fmt_size_t.
1502 (symbol_find_odo_debug): Likewise.
1503 (symbols_dump): Likewise.
1504 (calculate_capacity): Likewise.
1505 (field_str): Likewise.
1506 (symbols_update): Likewise.
1507 (symbol_field_forward): Likewise.
1508 (numeric_group_attrs): Return uint64_t rather than size_t and
1509 change inherit variable to from size_t to uint64_t.
1510 (new_literal_add): Use HOST_SIZE_T_PRINT_UNSIGNED instead of
1511 "%zu" or GCC_PRISZ instead of "z" or HOST_SIZE_T_PRINT_DEC instead
1512 of "%zd" and cast corresponding argument to fmt_size_t.
1513 (temporaries_t::dump): Likewise.
1514 (cbl_label_t::str): Likewise.
1515 (symbol_label_add): Likewise.
1516 (symbol_program_add): Likewise.
1517 (symbol_forward_names): Likewise.
1518 (symbol_forward_to): Likewise.
1519 (cbl_file_key_t::deforward): Likewise.
1520 (cbl_file_key_t::str): Likewise.
1521 * gengen.cc (show_type): Use PRId64 instead of "ld".
1522 (gg_unique_in_function): Use HOST_SIZE_T_PRINT_DEC instead of
1523 %ld and cast corresponding argument to fmt_size_t.
1524 * scan.l: Add %top section with #include "config.h".
1525 * genmath.cc (parser_add): Use HOST_SIZE_T_PRINT_DEC instead of
1526 %ld and cast corresponding argument to fmt_size_t.
1527 (parser_subtract): Likewise.
1528 * parse.y: Include "config.h" before <fstream>. Use
1529 HOST_SIZE_T_PRINT_UNSIGNED instead of "%zu" and cast corresponding
1530 argument to fmt_size_t. Change type of sign_attrs, group_sign and
1531 type_implies from size_t to uint64_t.
1532 (perform_t::ec_labels_t::new_label): Use HOST_SIZE_T_PRINT_UNSIGNED
1533 instead of "%zu" or GCC_PRISZ instead of "z" or HOST_SIZE_T_PRINT_DEC
1534 instead of "%zd" and cast corresponding argument to fmt_size_t.
1535 (stringify_src_t::dump): Likewise.
1536 (lang_check_failed): Likewise.
1537 (numstr2i): Use GCC_PRISZ instead of "z" and pass address of temporary
1538 with fmt_size_t type to sscanf and then copy it over.
1539 (initialize_statement): Use HOST_SIZE_T_PRINT_UNSIGNED instead of
1540 "%zu" or GCC_PRISZ instead of "z" or HOST_SIZE_T_PRINT_DEC instead
1541 of "%zd" and cast corresponding argument to fmt_size_t.
1542 (dump_inspect_oper): Likewise.
1543 (new_literal): Likewise.
1544 (literal_subscripts_valid): Likewise.
1545 (eval_subject_t::label): Likewise.
1546 * genapi.cc (level_88_helper): Likewise.
1547 (parser_call_targets_dump): Likewise.
1548 (combined_name): Use HOST_SIZE_T_PRINT_DEC instead of "%ld"
1549 and cast corresponding argument to fmt_size_t.
1550 (section_label): Likewise.
1551 (paragraph_label): Likewise.
1552 (leave_procedure): Likewise.
1553 (parser_perform): Likewise.
1554 (parser_perform_times): Likewise.
1555 (internal_perform_through): Likewise.
1556 (internal_perform_through_times): Likewise.
1557 (parser_enter_program): Likewise.
1558 (parser_init_list_size): Likewise.
1559 (parser_init_list): Likewise.
1560 (psa_FldLiteralN): Likewise.
1561 (psa_FldBlob): Likewise.
1562 (parser_assign): Likewise.
1563 (parser_free): Pass p->field->name to dbgmsg.
1564 (parser_division): Use HOST_SIZE_T_PRINT_DEC instead of "%ld"
1565 and cast corresponding argument to fmt_size_t.
1566 (perform_outofline_before_until): Likewise.
1567 (perform_outofline_after_until): Likewise.
1568 (perform_outofline_testafter_varying): Likewise.
1569 (perform_outofline_before_varying): Likewise.
1570 (perform_inline_testbefore_varying): Likewise.
1571 (parser_inspect): Change n_operations parameter type from
1572 unsigned long to size_t.
1573 (parser_intrinsic_callv): Use HOST_SIZE_T_PRINT_DEC instead
1574 of "%zd" and cast corresponding argument to fmt_size_t.
1575 (parser_bitop): Use HOST_SIZE_T_PRINT_HEX_PURE instead of
1576 "%lx" and cast corresponding argument to fmt_size_t.
1577 (parser_bitwise_op): Likewise.
1578 (parser_program_hierarchy): Use HOST_SIZE_T_PRINT_DEC instead of "%ld"
1579 and cast corresponding argument to fmt_size_t.
1580 (parser_set_handled): Use HOST_SIZE_T_PRINT_HEX_PURE instead of
1581 "%lx" and cast corresponding argument to fmt_size_t.
1582 (parser_set_numeric): Use HOST_SIZE_T_PRINT_DEC instead of "%ld"
1583 and cast corresponding argument to fmt_size_t.
1584 (psa_new_var_decl): Use HOST_SIZE_T_PRINT_DEC instead of "%ld"
1585 and cast corresponding argument to fmt_size_t.
1586 (parser_symbol_add): Use HOST_SIZE_T_PRINT_DEC instead of "%zd"
1587 or HOST_SIZE_T_PRINT_HEX_PURE instead of "%lx" and cast corresponding
1588 argument to fmt_size_t.
1589 * cdf-copy.cc: Include "config.h" first.
1590 * scan_ante.h (trim_location): Use HOST_SIZE_T_PRINT_UNSIGNED instead
1591 of "%zu" or "%d" and cast corresponding argument to fmt_size_t.
1592 * structs.cc (create_cblc_field_t): Use ULONGLONG instead of SIZE
1593 for "attr".
1594 * cbldiag.h (dbgmsg): Add ATTRIBUTE_PRINTF_1.
1595 * gcobolspec.cc (lang_specific_driver): Use HOST_SIZE_T_PRINT_DEC
1596 instead of "%ld" and cast corresponding argument to fmt_size_t.
1597 * parse_ante.h (literal_of): Use HOST_SIZE_T_PRINT_UNSIGNED instead of
1598 "%zu" or GCC_PRISZ instead of "z" or HOST_SIZE_T_PRINT_DEC instead
1599 of "%zd" and cast corresponding argument to fmt_size_t.
1600 (evaluate_elem_t::dump): Likewise.
1601 (arith_t::another_pair): Likewise.
1602 (current_t::end_program): Likewise.
1603 (file_add): Likewise.
1604 (implicit_paragraph): Likewise.
1605 (implicit_section): Likewise.
1606 (data_division_ready): Use HOST_SIZE_T_PRINT_DEC instead of "%d"
1607 and cast corresponding argument to fmt_size_t.
1608 * symbols.h (struct cbl_field_t): Change attr member type from size_t
1609 to uint64_t.
1610 (cbl_field_t::set_attr): Change return type from size_t to uint64_t.
1611 (cbl_field_t::clear_attr): Likewise.
1612 (function_descr_t::init): Use HOST_SIZE_T_PRINT_UNSIGNED instead of
1613 "%zu" or GCC_PRISZ instead of "z" or HOST_SIZE_T_PRINT_DEC instead
1614 of "%zd" and cast corresponding argument to fmt_size_t.
1615 (cbl_perform_tgt_t::dump): Likewise.
1616 (numeric_group_attrs): Change return type from size_t to uint64_t.
1617
1618 2025-07-29 Robert Dubner <[email protected]>
1619
1620 Backported from master:
1621 2025-04-24 Robert Dubner <[email protected]>
1622
1623 * genapi.cc: (initialize_variable_internal): Change TRACE1 formatting.
1624 (create_and_call): Repair RETURN-CODE processing.
1625 (mh_source_is_group): Repair run-time IF type comparison.
1626 (psa_FldLiteralA): Change TRACE1 formatting.
1627 (parser_symbol_add): Eliminate unnecessary code.
1628 * genutil.cc: Eliminate SET_EXCEPTION_CODE macro.
1629 (get_data_offset_dest): Repair set_exception_code logic.
1630 (get_data_offset_source): Likewise.
1631 (get_binary_value): Likewise.
1632 (refer_refmod_length): Likewise.
1633 (refer_fill_depends): Likewise.
1634 (refer_offset_dest): Likewise.
1635 (refer_size_dest): Likewise.
1636 (refer_offset_source): Likewise.
1637
1638 2025-04-25 Release Manager
1639
1640 * GCC 15.1.0 released.
1641
1642 2025-04-16 Bob Dubner <[email protected]>
1643
1644 PR cobol/119759
1645 * LICENSE: Deleted.
1646
1647 2025-04-15 Richard Biener <[email protected]>
1648
1649 PR cobol/119302
1650 * Make-lang.in (GCOBOLIO_INSTALL_NAME): Define.
1651 Use $(GCOBOLIO_INSTALL_NAME) for gcobol.3 manpage source
1652 upon install.
1653
1654 2025-04-14 Jakub Jelinek <[email protected]>
1655
1656 PR cobol/119776
1657 * lang.opt (fmax-errors): Remove.
1658 * lang.opt.urls: Regenerate.
1659 * cobol1.cc (cobol_langhook_handle_option) <case OPT_fmax_errors>:
1660 Remove.
1661 * gcobol.1: Document -fmax-errors=nerror rather than
1662 -fmax-errors nerror.
1663
1664 2025-04-14 Jakub Jelinek <[email protected]>
1665
1666 PR cobol/119777
1667 * lang.opt (include): Remove Var(cobol_include).
1668 * cobol1.cc (cobol_langhook_handle_option) <case OPT_include>: Use
1669 arg instead of cobol_include.
1670
1671 2025-04-14 Jakub Jelinek <[email protected]>
1672
1673 PR cobol/119777
1674 * lang.opt (fsyntax-only): Remove.
1675 * lang.opt.urls: Regenerate.
1676
1677 2025-04-13 Rainer Orth <[email protected]>
1678 Simon Sobisch <[email protected]>
1679
1680 PR cobol/119217
1681 * parse.y: Rename OVERFLOW to OVERFLOW_kw.
1682 Specify type name in %token directive.
1683 * scan.l: Likewise.
1684 * token_names.h: Regenerate.
1685
1686 2025-04-13 Rainer Orth <[email protected]>
1687
1688 PR cobol/119217
1689 * util.cc (class timespec_t): Rename to cbl_timespec.
1690
1691 2025-04-13 Rainer Orth <[email protected]>
1692
1693 * genapi.cc: Include target.h.
1694 (section_label): Use ASM_COMMENT_START.
1695 (paragraph_label): Likewise.
1696 (parser_perform): Likewise.
1697 (internal_perform_through): Likewise.
1698 (hijack_for_development): Likewise.
1699
1700 2025-04-12 Bob Dubner <[email protected]>
1701
1702 PR cobol/119694
1703 * cbldiag.h: Eliminate getenv() calls.
1704 * cdf.y: Likewise.
1705 * cobol1.cc: Likewise.
1706 * except.cc: Likewise.
1707 * genapi.cc: Likewise.
1708 * lexio.cc: Likewise.
1709 * parse.y: Likewise.
1710 * scan_ante.h: Likewise.
1711 * show_parse.h: Likewise.
1712 * symbols.cc: Likewise.
1713 * symfind.cc: Likewise.
1714 * util.cc: Likewise.
1715
1716 2025-04-09 Bob Dubner <[email protected]>
1717
1718 PR cobol/119682
1719 * genapi.cc: (cobol_compare): Change the call to __gg__compare().
1720
1721 2025-04-08 Jakub Jelinek <[email protected]>
1722
1723 PR cobol/119364
1724 * genapi.cc (function_handle_from_name): Use sizeof_pointer.
1725 (parser_file_add): Use int_size_in_bytes(VOID_P) and
1726 int_size_in_bytes(int).
1727 (inspect_tally): Use int_size_in_bytes(VOID_P).
1728 (inspect_replacing): Likewise.
1729 (gg_array_of_field_pointers): Likewise.
1730 (gg_array_of_file_pointers): Likewise.
1731 (parser_set_pointers): Use sizeof_pointer.
1732 * cobol1.cc (create_our_type_nodes_init): Use
1733 int_size_in_bytes(SIZE_T) and int_size_in_bytes(VOID_P).
1734 * gengen.cc (gg_array_of_size_t): Use int_size_in_bytes(SIZE_T).
1735 (gg_array_of_bytes): Just use N, don't multiply it by
1736 sizeof(unsigned char).
1737 * parse.y: Include tree.h. Use int_size_in_bytes(ptr_type_node).
1738
1739 2025-04-07 Iain Sandoe <[email protected]>
1740
1741 * symbols.cc : Remove trailing // on standard_internal.
1742 (cbl_field_t::internalize): Print a warning if we fail to
1743 initialise iconv.
1744
1745 2025-04-07 Jakub Jelinek <[email protected]>
1746
1747 * Make-lang.in (cobol/charmaps.cc, cobol/valconv.cc): Use a BRE
1748 only sed regex.
1749
1750 2025-04-07 Jakub Jelinek <[email protected]>
1751
1752 PR web/119227
1753 * Make-lang.in (GCOBOL_HTML_FILES): New variable.
1754 (cobol.install-html, cobol.html, cobol.srchtml): Use
1755 $(GCOBOL_HTML_FILES) instead of gcobol.html gcobol-io.html.
1756 (gcobol.html): Rename goal to ...
1757 ($(build_htmldir)/gcobol/gcobol.html): ... this. Run mkinstalldirs.
1758 (gcobol-io.html): Rename goal to ...
1759 ($(build_htmldir)/gcobol/gcobol-io.html): ... this. Run mkinstalldirs.
1760
1761 2025-04-06 Iain Sandoe <[email protected]>
1762
1763 PR cobol/119414
1764 * gcobolspec.cc (append_rdynamic,
1765 append_allow_multiple_definition, append_fpic): Remove.
1766 (lang_specific_driver): Remove platform-specific command
1767 line option handling.
1768
1769 2025-04-05 Iain Sandoe <[email protected]>
1770
1771 * gcobolspec.cc (SPEC_FILE): New.
1772 (lang_specific_driver): Make the 'need libgcobol' flag global
1773 so that the prelink callback can use it. Libm use is now handled
1774 via the library spec.
1775 (lang_specific_pre_link): Include libgcobol.spec where needed.
1776
1777 2025-04-04 Bob Dubner <[email protected]>
1778
1779 * cobol1.cc: Eliminate cobol_langhook_post_options.
1780 * symbols.cc: Definition of RETURN-CODE special register sets
1781 ::attr member to signable_e.
1782
1783 2025-04-04 Bob Dubner <[email protected]>
1784
1785 * cobol1.cc: (cobol_langhook_post_options): Implemented in order to set
1786 flag_strict_aliasing to zero.
1787 * genapi.cc: (set_user_status): Add comment.
1788 (parser_intrinsic_subst): Expand SHOW_PARSE information.
1789 (psa_global): Change names of return-code and upsi globals,
1790 (psa_FldLiteralA): Set DECL_PRESERVE_P for FldLiteralA.
1791 * gengen.cc: (show_type): Add POINTER type.
1792 (gg_define_function_with_no_parameters): Set DECL_PRESERVE_P for COBOL-
1793 style nested programs. (gg_array_of_bytes): Fix bad cast.
1794
1795 2025-04-03 Jakub Jelinek <[email protected]>
1796
1797 PR cobol/119242
1798 * genapi.cc (binary_initial_from_float128): Use
1799 native_encode_wide_int.
1800
1801 2025-04-02 Bob Dubner <[email protected]>
1802
1803 PR cobol/119521
1804 * genapi.cc: (parser_division): Change comment.
1805 (parser_symbol_add): Change intermediate_t handling.
1806 * parse.y: Multiple changes to new_alphanumeric() calls.
1807 * parse_ante.h: Establish named constant for date function
1808 calls. Change declaration of new_alphanumeric() function.
1809 * symbols.cc: (new_temporary_impl): Use named constant
1810 for default size of temporary alphanumerics.
1811 * symbols.h: Establish MAXIMUM_ALPHA_LENGTH constant.
1812
1813 2025-04-02 Jonathan Wakely <[email protected]>
1814
1815 * symfind.cc (finalize_symbol_map2): Use std::list::remove_if
1816 instead of std::remove_if.
1817
1818 2025-04-01 Bob Dubner <[email protected]>
1819
1820 * genapi.cc: (section_label): Use xasprintf() instead of sprintf().
1821 (paragraph_label): Likewise. (leave_procedure): Likewise.
1822 (find_procedure): Likewise. (parser_goto): Likewise.
1823 (parser_enter_file): Likewise.
1824
1825 2025-03-28 Jakub Jelinek <[email protected]>
1826
1827 * Make-lang.in (cobol/charmaps.cc, cobol/valconv.cc): Used sed -e
1828 instead of cp and multiple sed -i commands. Always prefix libgcobol
1829 header names in #include directives with ../../libgcobol/ rather than
1830 something depending on $(LIB_SOURCE).
1831
1832 2025-03-28 Bob Dubner <[email protected]>
1833
1834 * Make-lang.in: Eliminate libgcobol.h from gcc/cobol files.
1835 * genapi.cc: Eliminate "#include libgcobol.h".
1836 (parser_display_internal): Change comment.
1837 * genmath.cc: Eliminate "#include libgcobol.h".
1838 * genutil.cc: Likewise.
1839 (get_power_of_ten): Change comment.
1840 * structs.cc: Eliminate cblc_int128_type_node.
1841 * structs.h: Likewise.
1842 * symbols.h: Receive comment from libgcobol.h
1843
1844 2025-03-28 Jakub Jelinek <[email protected]>
1845
1846 * Make-lang.in (cobol.srcextra): Use sed to turn
1847 .../gcc/cobol/*.{y,l,h,cc} and cobol/*.{y,l,h,cc} in #line directives
1848 into just *.{y,l,h,cc}.
1849
1850 2025-03-28 Richard Biener <[email protected]>
1851
1852 PR bootstrap/119513
1853 * Make-lang.in (cobol.srcextra): Use cp instead of ln, ignore
1854 errors.
1855
1856 2025-03-28 Bob Dubner <[email protected]>
1857
1858 * genapi.cc: (create_and_call): cast unsigned char to int
1859
1860 2025-03-28 Richard Biener <[email protected]>
1861
1862 * genapi.cc (initial_from_float128): Use native_encode_real.
1863
1864 2025-03-28 Iain Sandoe <[email protected]>
1865
1866 * cobol-system.h: Remove <cmath>.
1867
1868 2025-03-26 Jonathan Wakely <[email protected]>
1869
1870 * except.cc (cbl_enabled_exceptions_t::turn_on_off): Replace
1871 quadratic loop with a single pass.
1872
1873 2025-03-26 Bob Dubner <[email protected]>
1874
1875 * genapi.cc: (parser_display_internal): Adjust for E vs e exponent notation.
1876 * parse.y: (literal_refmod_valid): Display correct value in error message.
1877
1878 2025-03-26 Jakub Jelinek <[email protected]>
1879
1880 PR cobol/119242
1881 * genutil.h (get_power_of_ten): Remove #pragma GCC diagnostic
1882 around declaration.
1883 * genapi.cc (psa_FldLiteralN): Change type of value from
1884 __int128 to FIXED_WIDE_INT(128). Remove #pragma GCC diagnostic
1885 around the declaration. Use wi::min_precision to determine
1886 minimum unsigned precision of the value. Use wi::neg_p instead
1887 of value < 0 tests and wi::set_bit_in_zero<FIXED_WIDE_INT(128)>
1888 to build sign bit. Handle field->data.capacity == 16 like
1889 1, 2, 4 and 8, use wide_int_to_tree instead of build_int_cst.
1890 (mh_source_is_literalN): Remove #pragma GCC diagnostic around
1891 the definition.
1892 (binary_initial_from_float128): Likewise.
1893 * genutil.cc (get_power_of_ten): Remove #pragma GCC diagnostic
1894 before the definition.
1895
1896 2025-03-25 Bob Dubner <[email protected]>
1897 Richard Biener <[email protected]>
1898 Jakub Jelinek <[email protected]>
1899 James K. Lowden <[email protected]>
1900 Robert Dubner <[email protected]>
1901
1902 PR cobol/119241
1903 * cdf.y: (cdfval_base_t::operator()): Return const.
1904 * cdfval.h: (struct cdfval_base_t): Add const cdfval_base_t&
1905 operator().
1906 (struct cdfval_t): Add cdfval_t constructor. Change cdf_value
1907 definitions.
1908 * gcobolspec.cc (lang_specific_driver): Formatting fix.
1909 * genapi.cc: Include fold-const.h and realmpfr.h.
1910 (initialize_variable_internal): Use real_to_decimal instead of
1911 strfromf128.
1912 (get_binary_value_from_float): Use wide_int_to_tree instead of
1913 build_int_cst_type.
1914 (psa_FldLiteralN): Use fold_convert instead of strfromf128,
1915 real_from_string and build_real.
1916 (parser_display_internal): Rewritten to work on REAL_VALUE_TYPE
1917 rather than _Float128.
1918 (mh_source_is_literalN): Use FIXED_WIDE_INT(128) rather than
1919 __int128, wide_int_to_tree rather than build_int_cst_type,
1920 fold_convert rather than build_string_literal.
1921 (real_powi10): New function.
1922 (binary_initial_from_float128): Change type of last argument from
1923 _Float128 to REAL_VALUE_TYPE, process it using real.cc and mpfr
1924 APIs.
1925 (digits_from_float128): Likewise.
1926 (initial_from_float128): Make static. Remove value argument, add
1927 local REAL_VALUE_TYPE value variable instead, process it using
1928 real.cc and native_encode_expr APIs.
1929 (parser_symbol_add): Adjust initial_from_float128 caller.
1930 * genapi.h (initial_from_float128): Remove declaration.
1931 * genutil.cc (get_power_of_ten): Change return type from __int128
1932 to FIXED_WIDE_INT(128), ditto for retval type, change type of pos
1933 from __int128 to unsigned long long.
1934 (scale_by_power_of_ten_N): Use wide_int_to_tree instead of
1935 build_int_cst_type. Use FIXED_WIDE_INT(128) instead of __int128
1936 as power_of_ten variable type.
1937 (copy_little_endian_into_place): Likewise.
1938 * genutil.h (get_power_of_ten): Change return type from __int128
1939 to FIXED_WIDE_INT(128).
1940 * parse.y (%union): Change type of float128 from _Float128 to
1941 REAL_VALUE_TYPE.
1942 (string_of): Change argument type from _Float128 to
1943 const REAL_VALUE_TYPE &, use real_to_decimal rather than
1944 strfromf128. Add another overload with tree argument type.
1945 (field: cdf): Use real_zerop rather than comparison against 0.0.
1946 (occurs_clause, const_value): Use real_to_integer.
1947 (value78): Use build_real and real_to_integer.
1948 (data_descr1): Use real_to_integer.
1949 (count): Use real_to_integer, real_from_integer and real_identical
1950 instead of direct comparison.
1951 (value_clause): Use real_from_string3 instead of num_str2i. Use
1952 real_identical instead of direct comparison. Use build_real.
1953 (allocate): Use real_isneg and real_iszero instead of <= 0 comparison.
1954 (move_tgt): Use real_to_integer, real_value_truncate,
1955 real_from_integer and real_identical instead of comparison of casts.
1956 (cce_expr): Use real_arithmetic and real_convert or real_value_negate
1957 instead of direct arithmetics on _Float128.
1958 (cce_factor): Use real_from_string3 instead of numstr2i.
1959 (literal_refmod_valid): Use real_to_integer.
1960 * symbols.cc (symbol_table_t::registers_t::registers_t): Formatting
1961 fix.
1962 (ERROR_FIELD): Likewise.
1963 (extend_66_capacity): Likewise.
1964 (cbl_occurs_t::subscript_ok): Use real_to_integer, real_from_integer
1965 and real_identical.
1966 * symbols.h (cbl_field_data_t::etc_t::value): Change type from
1967 _Float128 to tree.
1968 (cbl_field_data_t::etc_t::etc_t): Adjust defaulted argument value.
1969 (cbl_field_data_t::cbl_field_data_t): Formatting fix. Use etc()
1970 rather than etc(0).
1971 (cbl_field_data_t::value_of): Change return type from _Float128 to
1972 tree.
1973 (cbl_field_data_t::operator=): Change return and argument type from
1974 _Float128 to tree.
1975 (cbl_field_data_t::valify): Use real_from_string, real_value_truncate
1976 and build_real.
1977 (cbl_field_t::same_as): Use build_zero_cst instead of _Float128(0.0).
1978
1979 2025-03-24 Iain Sandoe <[email protected]>
1980
1981 * cdf-copy.cc: Move host include before system.h
1982
1983 2025-03-24 Andreas Schwab <[email protected]>
1984
1985 PR cobol/119390
1986 * gcobolspec.cc (lang_specific_driver): Use pointer instead of
1987 copying into fixed array.
1988
1989 2025-03-21 Iain Sandoe <[email protected]>
1990
1991 * gcobolspec.cc (lang_specific_driver): Add libstdc++
1992 for any link line.
1993
1994 2025-03-21 Iain Sandoe <[email protected]>
1995
1996 * gcobolspec.cc (add_arg_lib): Fix typo.
1997 (lang_specific_driver): Arrange to append both -lgcobol
1998 and -static-libgcobol for targets without
1999 HAVE_LD_STATIC_DYNAMIC.
2000
2001 2025-03-21 Jakub Jelinek <[email protected]>
2002
2003 * parse.y: Rename COB_BLOCK to BLOCK_kw, COB_SIGNED to SIGNED_kw and
2004 COB_UNSIGNED to UNSIGNED_kw.
2005 * scan.l: Likewise.
2006 * token_names.h: Regenerate.
2007
2008 2025-03-21 Richard Biener <[email protected]>
2009
2010 * symbols.cc (empty_float, empty_comp5, empty_literal,
2011 empty_conditional, debug_registers, special_registers): Move
2012 global cbl_field_t typed data to ...
2013 (symbol_table_init): ... local scope here.
2014
2015 2025-03-21 Richard Biener <[email protected]>
2016
2017 PR cobol/119241
2018 * symbols.h: Do not typedef tree.
2019 * cdf.y: Include coretypes.h and tree.h.
2020 * symbols.cc: Likewise.
2021 * symfind.cc: Likewise.
2022 * util.cc: Likewise.
2023 * parse.y: Include coretypes.h and tree.h where appropriate.
2024 Rename BLOCK to COB_BLOCK, SIGNED to COB_SIGNED, UNSIGNED
2025 to COB_UNSIGNED.
2026 * scan.l: Likewise.
2027 * token_names.h: Likewise.
2028 * cobol1.cc: Do not define HOWEVER_GCC_DEFINES_TREE.
2029 * except.cc: Likewise.
2030 * genapi.cc: Likewise.
2031 * gengen.cc: Likewise.
2032 * genmath.cc: Likewise.
2033 * genutil.cc: Likewise.
2034 * structs.cc: Likewise.
2035
2036 2025-03-20 Iain Sandoe <[email protected]>
2037
2038 * cdfval.h (struct cdfval_t): Overload long instead of int64_t.
2039
2040 2025-03-18 Iain Sandoe <[email protected]>
2041
2042 * gcobolspec.cc (append_rpath): Remove.
2043 (lang_specific_driver): Remove hard-wired rpath and library
2044 names.
2045
2046 2025-03-18 Iain Sandoe <[email protected]>
2047
2048 PR cobol/119301
2049 * util.cc: Check for the availability of get_current_dir_name
2050 snf fall back to getcwd() if it is not present on the host.
2051
2052 2025-03-18 Richard Biener <[email protected]>
2053
2054 * gengen.cc (gg_finalize_function): Dump to TDI_original.
2055
2056 2025-03-18 Bob Dubner <[email protected]>
2057
2058 * cdf.y: Make compatible with C++14.
2059 * copybook.h: Likewise.
2060 * dts.h: Likewise.
2061 * except.cc: Likewise.
2062 * genapi.cc: Likewise.
2063 * genutil.cc: Likewise.
2064 * genutil.h: Likewise.
2065 * lexio.cc: Likewise.
2066 * parse.y: Likewise.
2067 * parse_ante.h: Likewise.
2068 * show_parse.h: Likewise.
2069 * symbols.cc: Likewise.
2070 * symbols.h: Likewise.
2071 * util.cc: Likewise.
2072
2073 2025-03-18 Matthias Klose <[email protected]>
2074
2075 * Make-lang.in (GCOBC_TARGET_INSTALL_NAME, gcobol-cross): New.
2076 (cobol.all.cross): Depend on gcobol-cross.
2077 (cobol.install-common): Adjust install for the cross build.
2078 (cobol.uninstall): Use *_INSTALL_NAME for uninstall.
2079
2080 2025-03-18 Iain Sandoe <[email protected]>
2081
2082 * util.cc (cbl_field_t::report_invalid_initial_value): Avoid
2083 auto here and specify const char *.
2084
2085 2025-03-18 Jose E. Marchesi <[email protected]>
2086
2087 * cdf-copy.cc (copybook_elem_t::open_file): Use ldirname rather
2088 than dirname.
2089
2090 2025-03-18 Iain Sandoe <[email protected]>
2091
2092 * parse.y: Remove c++ header includes appearing after
2093 system.h.
2094
2095 2025-03-17 Bob Dubner <[email protected]>
2096
2097 PR cobol/119213
2098 * Make-lang.in: Eliminate CPPFLAGS= assignment.
2099 * cdf.y: Modify #includes that reference libgcobol.
2100 * cobol1.cc: Modify #includes that reference libgcobol.
2101 * except.cc: Modify #includes that reference libgcobol.
2102 * gcobolspec.cc: Modify #includes that reference libgcobol.
2103 * genapi.cc: Modify #includes that reference libgcobol.
2104 * gengen.cc: Modify #includes that reference libgcobol.
2105 * genmath.cc: Modify #includes that reference libgcobol.
2106 * genutil.cc: Modify #includes that reference libgcobol.
2107 * parse.y: Modify #includes that reference libgcobol.
2108 * scan.l: Modify #includes that reference libgcobol.
2109 * structs.cc: Modify #includes that reference libgcobol.
2110 * symbols.cc: Modify #includes that reference libgcobol.
2111 * symfind.cc: Modify #includes that reference libgcobol.
2112 * util.cc: Modify #includes that reference libgcobol.
2113
2114 2025-03-14 Robert Dubner <[email protected]>
2115
2116 PR cobol/119214
2117 * gengen.cc: applies if( !optimize ) test
2118
2119 2025-03-13 Matthias Klose <[email protected]>
2120
2121 * Make-lang.in (cobol.install-common, cobol.install-man): Honor
2122 GCOBOL_INSTALL_NAME.
2123
2124 2025-03-13 Richard Biener <[email protected]>
2125
2126 PR cobol/119229
2127 * gengen.cc (gg_declare_variable): Use DECL_EXTERNAL and
2128 drop TREE_STATIC for vs_external_reference.
2129
2130 2025-03-12 Mark Wielaard <[email protected]>
2131
2132 * lang.opt.urls: Regenerated.
2133
2134 2025-03-12 Simon Martin <[email protected]>
2135
2136 * Make-lang.in: Remove unnecessary CPPFLAGS update.
2137
2138 2025-03-12 Richard Biener <[email protected]>
2139
2140 * Make-lang.in (lang_checks): Add check-cobol.
2141
2142 2025-03-11 Richard Biener <[email protected]>
2143
2144 * gcobolspec.cc (lang_specific_driver): For OPT_print_* do
2145 not error on no input files.
2146
2147 2025-03-11 Jakub Jelinek <[email protected]>
2148
2149 * Make-lang.in: Remove .exe extension from comments.
2150 (cobol.serial): Set to cobol1$(exeext).
2151 (cobol1$(exeext)): Depend on $(cobol.prev). Add
2152 LINK_PROGRESS calls before/after the link command.
2153
2154 2025-03-11 Jakub Jelinek <[email protected]>
2155
2156 * Make-lang.in (cobol/parse.c, cobol/cdf.c, cobol/scan.c): Remove.
2157 (cobol/parse.cc, cobol/cdf.cc, cobol/scan.cc): New goals.
2158 (cobol/cdf.o): Depend on cobol/cdf.cc rather than cobol/cdf.c.
2159 (cobol/parse.o): Depend on cobol/parse.cc rather than cobol/parse.c.
2160 (cobol/scan.o): Depend on cobol/scan.cc rather than cobol/scan.c,
2161 on cobol/cdf.cc rather than cobol/cdf.c and on cobol/parse.cc rather
2162 than cobol/parse.c.
2163 (cobol.srcextra): Depend on cobol/parse.cc cobol/cdf.cc cobol/scan.cc
2164 rather than cobol/parse.c cobol/cdf.c cobol/scan.c.
2165
2166 2025-03-11 James K. Lowden <[email protected]>
2167
2168 * LICENSE: New file.
2169 * Make-lang.in: New file.
2170 * config-lang.in: New file.
2171 * lang.opt: New file.
2172 * lang.opt.urls: New file.
2173 * cbldiag.h: New file.
2174 * cdfval.h: New file.
2175 * cobol-system.h: New file.
2176 * copybook.h: New file.
2177 * dts.h: New file.
2178 * exceptg.h: New file.
2179 * gengen.h: New file.
2180 * genmath.h: New file.
2181 * genutil.h: New file.
2182 * inspect.h: New file.
2183 * lang-specs.h: New file.
2184 * lexio.h: New file.
2185 * parse_ante.h: New file.
2186 * parse_util.h: New file.
2187 * scan_ante.h: New file.
2188 * scan_post.h: New file.
2189 * show_parse.h: New file.
2190 * structs.h: New file.
2191 * symbols.h: New file.
2192 * token_names.h: New file.
2193 * util.h: New file.
2194 * cdf-copy.cc: New file.
2195 * lexio.cc: New file.
2196 * scan.l: New file.
2197 * parse.y: New file.
2198 * genapi.cc: New file.
2199 * genapi.h: New file.
2200 * gengen.cc: New file.
2201 * genmath.cc: New file.
2202 * genutil.cc: New file.
2203 * cdf.y: New file.
2204 * cobol1.cc: New file.
2205 * convert.cc: New file.
2206 * except.cc: New file.
2207 * gcobolspec.cc: New file.
2208 * structs.cc: New file.
2209 * symbols.cc: New file.
2210 * symfind.cc: New file.
2211 * util.cc: New file.
2212 * gcobc: New file.
2213 * gcobol.1: New file.
2214 * gcobol.3: New file.
2215 * help.gen: New file.
2216 * udf/stored-char-length.cbl: New file.
2217
2218
2219 Copyright (C) 2025 Free Software Foundation, Inc.
2220
2221 Copying and distribution of this file, with or without modification,
2222 are permitted in any medium without royalty provided the copyright
2223 notice and this notice are preserved.