diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2025-03-17 10:04:52 +0000 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2025-03-18 14:48:07 +0000 |
commit | 26884504503093e5019708f50816897c5d3a4958 (patch) | |
tree | 8ab614798c1b793c743d590891170e4520134c4b /gcc | |
parent | cfbabe10ddaba3f200f58910d49aa041d2abde8c (diff) | |
download | gcc-26884504503093e5019708f50816897c5d3a4958.zip gcc-26884504503093e5019708f50816897c5d3a4958.tar.gz gcc-26884504503093e5019708f50816897c5d3a4958.tar.bz2 |
cobol: Avoid a use of auto.
In this case the deduction for Darwin's implementation is 'char *' which
then conflicts with the second use of data.initial in the find_if
callback. Let's just specify it as 'const char *'.
gcc/cobol/ChangeLog:
* util.cc (cbl_field_t::report_invalid_initial_value): Avoid
auto here and specify const char *.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cobol/util.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cobol/util.cc b/gcc/cobol/util.cc index 9f746a3..3872f57 100644 --- a/gcc/cobol/util.cc +++ b/gcc/cobol/util.cc @@ -850,7 +850,7 @@ cbl_field_t::report_invalid_initial_value(const YYLTYPE& loc) const { /* * Check fraction for excess precision */ - auto p = strchr(data.initial, symbol_decimal_point()); + const char *p = strchr(data.initial, symbol_decimal_point()); if( p ) { auto pend = std::find(p, p + strlen(p), 0x20); int n = std::count_if( ++p, pend, isdigit ); |