aboutsummaryrefslogtreecommitdiff
path: root/gcc/cobol/dts.h
diff options
context:
space:
mode:
authorBob Dubner <rdubner@symas.com>2025-03-18 07:47:39 -0400
committerRobert Dubner <rdubner@symas.com>2025-03-18 12:19:15 -0400
commitc49382fd221fd40bce35a954d64bbda0fd14edef (patch)
tree868361212a68821bfe4e0d3660149304b2197cf5 /gcc/cobol/dts.h
parent563e6d926d9826d76895086d0c40a29dc90d66e5 (diff)
downloadgcc-c49382fd221fd40bce35a954d64bbda0fd14edef.zip
gcc-c49382fd221fd40bce35a954d64bbda0fd14edef.tar.gz
gcc-c49382fd221fd40bce35a954d64bbda0fd14edef.tar.bz2
cobol: Bring the code base into compliance with C++14
gcc/cobol * cdf.y: Make compatible with C++14. * copybook.h: Likewise. * dts.h: Likewise. * except.cc: Likewise. * genapi.cc: Likewise. * genutil.cc: Likewise. * genutil.h: Likewise. * lexio.cc: Likewise. * parse.y: Likewise. * parse_ante.h: Likewise. * show_parse.h: Likewise. * symbols.cc: Likewise. * symbols.h: Likewise. * util.cc: Likewise.
Diffstat (limited to 'gcc/cobol/dts.h')
-rw-r--r--gcc/cobol/dts.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cobol/dts.h b/gcc/cobol/dts.h
index 618f649..c345dc7 100644
--- a/gcc/cobol/dts.h
+++ b/gcc/cobol/dts.h
@@ -93,12 +93,12 @@ namespace dts {
if( eoinput == NULL ) eoinput = strchr(input, '\0');
auto ncm = re.size();
cm.resize(ncm);
- regmatch_t cms[ncm];
+ std::vector <regmatch_t> cms(ncm);
- int erc = regexec( &re, input, ncm, cms, 0 );
+ int erc = regexec( &re, input, ncm, cms.data(), 0 );
if( erc != 0 ) return false;
- std::transform( cms, cms+ncm, cm.begin(),
+ std::transform( cms.begin(), cms.end(), cm.begin(),
[input]( const regmatch_t& m ) {
return csub_match( input, m );
} );