Although I am confused about how _int64_t can be anything but a 64-bit signed integer, and because it is my understanding that long and long long really *do* change from platform to platform, I am loathe to stand in the way of your MacOS progress.
It passes my full set of tests, and "make check-cobol" on x86_64. So: LGTM > -----Original Message----- > From: Iain Sandoe <iains....@gmail.com> > Sent: Thursday, March 20, 2025 08:15 > To: rdub...@symas.com; gcc-patches@gcc.gnu.org > Subject: [PATCH] cobol: Do not overload int64_t, overload long and long > long. > > Tested on x86_64 linux/darwin, aarch64 linux, OK for trunk? > thanks > Iain > > --- 8< --- > > Since the type that is used for int64_t varies between platforms trying > to overload it creates ambiguous or conflicting overloads. Therefore, > just overload 'long' and 'long long'. > > gcc/cobol/ChangeLog: > > * cdfval.h (struct cdfval_t): Overload long instead of int64_t. > > Signed-off-by: Iain Sandoe <i...@sandoe.co.uk> > --- > gcc/cobol/cdfval.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/cobol/cdfval.h b/gcc/cobol/cdfval.h > index 1453f2af5f8..4682db8074b 100644 > --- a/gcc/cobol/cdfval.h > +++ b/gcc/cobol/cdfval.h > @@ -79,7 +79,7 @@ struct cdfval_t : public cdfval_base_t { > cdfval_base_t::string = NULL; > cdfval_base_t::number = value; > } > - cdfval_t( int64_t value ) > + cdfval_t( long value ) > : lineno(yylineno), filename(cobol_filename()) > { > cdfval_base_t::off = false; > -- > 2.39.2 (Apple Git-143)