On Wed, Mar 05, 2025 at 09:47:45AM -0600, Robert Dubner wrote:
> > -----Original Message-----
> > From: Jakub Jelinek <[email protected]>
> > Sent: Wednesday, March 5, 2025 08:35
> > To: Richard Biener <[email protected]>
> > Cc: James K. Lowden <[email protected]>; [email protected]
> > Subject: Re: The COBOL front end, version 3, now in 14 easy pieces
> >
> > On Wed, Mar 05, 2025 at 12:46:48PM +0100, Richard Biener wrote:
> > > and the installed compiler behaves as intended. I can trick -m32 to
> > "work"
> > > by using the generic gcc diriver:
> > >
> > > > ./install/gcc-cobol/usr/local/bin/gcc -x cobol t.cob -m32 -c
> > >
> > > but I think this is a less important issue.
> >
> > Agreed, it should be the compiler, i.e. cobol1, that diagnoses this
> rather
> > than the driver.
>
> I actually tried to do that, by looking for "case OPT_m32". in cobol1.cc.
No, you don't want to base the error on anything like that.
E.g. for Solaris gcc defaults to -m32 and -m64 needs to be used.
The error should be on missing features required for COBOL
emitted after option processing during FE initialization.
The test for missing __int128 or missing IEEE quad support is
if (!targetm.scalar_mode_supported_p (TImode) || !float128_type_node)
sorry ("COBOL not supported in this configuration");
or so.
Jakub