[Bug cobol/119810] FE: -include does not unset "included from"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119810 --- Comment #7 from GCC Commits --- The releases/gcc-15 branch has been updated by Robert Dubner : https://gcc.gnu.org/g:907e343138c9e4eee09c7e263418a45c67fbd116 commit r15-10129-g907e343138c9e4eee09c7e263418a45c67fbd116 Author: Robert Dubner Date: Tue May 20 13:35:15 2025 -0400 cobol: Multiple PRs; formatting; exception processing. The PRs mentined here have either been previously fixed, or are fixed by this commit. gcc/cobol/ChangeLog: PR cobol/119770 PR cobol/119772 PR cobol/119790 PR cobol/119771 PR cobol/119810 PR cobol/119335 PR cobol/119632 * cdf-copy.cc (GLOB_BRACE): Eliminate . * cdfval.h (_CDF_VAL_H_): Switch to C++ headers. * copybook.h (class copybook_elem_t): Eliminate . (class copybook_t): Likewise. * gcobc: Numerous changes to improve utility. * gcobol.1: Correct names in the list of functions. * genapi.cc (compare_binary_binary): Use has_attr() function. * lexio.cc (cdftext::lex_open): Typo; filename logic. (cdftext::process_file): Filename logic. * parse.y: Numerous parsing changes. * parse_ante.h (new_alphanumeric): C++ includes; changes to temporaries. (new_tempnumeric): Likewise. (new_tempnumeric_float): Likewise. (set_real_from_capacity): Created. * scan.l: Use yy_pop_state(). * scan_ante.h (typed_name): Find figconst from data.initial. * symbols.cc (symbol_valid_udf_args): Eliminate. (symbols_update): figconst processing. (new_temporary_impl): For functions, set .initial to function name. (temporaries_t::acquire): Likewise. (new_alphanumeric): Likewise. (new_temporary): Likewise. * symbols.h (_SYMBOLS_H_): Use C++ includes. (cbl_figconst_tok): Change handling of figconst. (cbl_figconst_field_of): Change handling of figconst. (symbol_valid_udf_args): Eliminate. * symfind.cc (symbol_match2): Change declaration. (symbol_match): Change declaration. libgcobol/ChangeLog: * charmaps.cc: Switch to C++ includes. * common-defs.h: Likewise. * constants.cc: Likewise. * ec.h: Remove #include . * gcobolio.h (GCOBOLIO_H_): Switch to C++ includes. * gfileio.cc: Likewise. * gmath.cc: Likewise. * intrinsic.cc: Comment formatting; C++ includes. * io.cc: C++ includes. * libgcobol.cc: (__gg__stash_exceptions): Eliminate. * valconv.cc: Switch to C++ includes. Co-Authored-By: James K. Lowden (cherry picked from commit fba34a0cc55488ad89becf81cf2c9ac517d244d4)
[Bug cobol/119810] FE: -include does not unset "included from"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119810 Robert Dubner changed: What|Removed |Added Status|NEW |RESOLVED CC||rdubner at gcc dot gnu.org Resolution|--- |FIXED --- Comment #6 from Robert Dubner --- Fixed per above comment.
[Bug cobol/119810] FE: -include does not unset "included from"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119810 --- Comment #5 from GCC Commits --- The master branch has been updated by Robert Dubner : https://gcc.gnu.org/g:fba34a0cc55488ad89becf81cf2c9ac517d244d4 commit r16-764-gfba34a0cc55488ad89becf81cf2c9ac517d244d4 Author: Robert Dubner Date: Tue May 20 13:35:15 2025 -0400 cobol: Multiple PRs; formatting; exception processing. The PRs mentined here have either been previously fixed, or are fixed by this commit. gcc/cobol/ChangeLog: PR cobol/119770 PR cobol/119772 PR cobol/119790 PR cobol/119771 PR cobol/119810 PR cobol/119335 PR cobol/119632 * cdf-copy.cc (GLOB_BRACE): Eliminate . * cdfval.h (_CDF_VAL_H_): Switch to C++ headers. * copybook.h (class copybook_elem_t): Eliminate . (class copybook_t): Likewise. * gcobc: Numerous changes to improve utility. * gcobol.1: Correct names in the list of functions. * genapi.cc (compare_binary_binary): Use has_attr() function. * lexio.cc (cdftext::lex_open): Typo; filename logic. (cdftext::process_file): Filename logic. * parse.y: Numerous parsing changes. * parse_ante.h (new_alphanumeric): C++ includes; changes to temporaries. (new_tempnumeric): Likewise. (new_tempnumeric_float): Likewise. (set_real_from_capacity): Created. * scan.l: Use yy_pop_state(). * scan_ante.h (typed_name): Find figconst from data.initial. * symbols.cc (symbol_valid_udf_args): Eliminate. (symbols_update): figconst processing. (new_temporary_impl): For functions, set .initial to function name. (temporaries_t::acquire): Likewise. (new_alphanumeric): Likewise. (new_temporary): Likewise. * symbols.h (_SYMBOLS_H_): Use C++ includes. (cbl_figconst_tok): Change handling of figconst. (cbl_figconst_field_of): Change handling of figconst. (symbol_valid_udf_args): Eliminate. * symfind.cc (symbol_match2): Change declaration. (symbol_match): Change declaration. libgcobol/ChangeLog: * charmaps.cc: Switch to C++ includes. * common-defs.h: Likewise. * constants.cc: Likewise. * ec.h: Remove #include . * gcobolio.h (GCOBOLIO_H_): Switch to C++ includes. * gfileio.cc: Likewise. * gmath.cc: Likewise. * intrinsic.cc: Comment formatting; C++ includes. * io.cc: C++ includes. * libgcobol.cc: (__gg__stash_exceptions): Eliminate. * valconv.cc: Switch to C++ includes. Co-Authored-By: James K. Lowden
[Bug cobol/119810] FE: -include does not unset "included from"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119810 James K. Lowden changed: What|Removed |Added Last reconfirmed||2025-05-16 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #4 from James K. Lowden --- Adding a line "foo" at the end provokes the error, too. (I'm not terribly concerned about a DATA DIVISION that ends abruptly at EOF; I'm not 100% convinced a separator period -- which is defined as [.][[:space:]] -- can also be [.]<>.) However, the problem was real, and is really fixed by 2349230d565 on our local parser branch. Because the -include option didn't set up the filename for diagnostics as is done for COPY, any error in the main file began with a spurious preamble about where it came from.
[Bug cobol/119810] FE: -include does not unset "included from"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119810 --- Comment #3 from Simon Sobisch --- Current GCC only raises that error if there is no NL after the final (which seems an interesting bug as well), so you won't see that error with the code example. Just use DATA DIVI. (= a syntax error), maybe you see the error then.
[Bug cobol/119810] FE: -include does not unset "included from"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119810 James K. Lowden changed: What|Removed |Added CC||jklowden at gcc dot gnu.org --- Comment #2 from James K. Lowden --- Unable to reproduce as of today. $ gcobol -E -include empty tbug.cbl | nl -ba 1 2 PROGRAM-ID. TBUG. 3 DATA DIVISION. There have been many changes in the last month. Perhaps this was incidentally corrected in the process.
[Bug cobol/119810] FE: -include does not unset "included from"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119810 Richard Biener changed: What|Removed |Added Keywords||diagnostic, wrong-debug --- Comment #1 from Richard Biener --- possibly also results in off .debug_line
