Re: The COBOL front end, version 3, now in 14 easy pieces (C++14)

2025-03-15 Thread James K. Lowden
On Mon, 10 Mar 2025 19:10:26 +0100 Richard Biener wrote: > > What is the right answer? Designated initializers are part of C99, > > but weren't added to C++ until C++20 > > (https://en.cppreference.com/w/cpp/language/initialization). > > Strictly speaking, we should remove all of them, because o

Re: The COBOL front end, version 3, now in 14 easy pieces (C++14)

2025-03-13 Thread James K. Lowden
On Thu, 13 Mar 2025 13:37:32 -0400 Paul Koning wrote: > > 4. cast pointers formatted with %p as (void*) > > Could that be (const void *) instead? Yes. Nothing is committed yet; I'll make that change first. Could you explain why it matters, please, for my edification? --jkl

Re: The COBOL front end, version 3, now in 14 easy pieces (C++14)

2025-03-13 Thread Paul Koning
> On Mar 13, 2025, at 11:27 AM, James K. Lowden > wrote: > > On Mon, 10 Mar 2025 19:10:26 +0100 > Richard Biener wrote: > >>> What is the right answer? Designated initializers are part of C99, >>> but weren't added to C++ until C++20 >>> (https://en.cppreference.com/w/cpp/language/initiali

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-12 Thread Mark Wielaard
Hi David, On Mon, Mar 10, 2025 at 05:40:18PM -0400, David Malcolm wrote: > FWIW gcc/cobol/lang.opt.urls has some D-specific things that look like > copy-and-paste cruft, but hopefully it won't cause problems. And some Fortran stuff. The autoregen bot currently flags it with the following diff: d

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-12 Thread David Malcolm
On Wed, 2025-03-12 at 12:09 +0100, Mark Wielaard wrote: > Hi David, > > On Mon, Mar 10, 2025 at 05:40:18PM -0400, David Malcolm wrote: > > FWIW gcc/cobol/lang.opt.urls has some D-specific things that look > > like > > copy-and-paste cruft, but hopefully it won't cause problems. > > And some Fortr

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-12 Thread Jakub Jelinek
On Wed, Mar 12, 2025 at 12:09:44PM +0100, Mark Wielaard wrote: > Hi David, > > On Mon, Mar 10, 2025 at 05:40:18PM -0400, David Malcolm wrote: > > FWIW gcc/cobol/lang.opt.urls has some D-specific things that look like > > copy-and-paste cruft, but hopefully it won't cause problems. > > And some Fo

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-11 Thread Jakub Jelinek
On Mon, Mar 10, 2025 at 05:34:40PM +0100, Richard Biener wrote: > Building gcobol with GCC 7 shows > > gcc/cobol/except.cc:285:70: sorry, unimplemented: non-trivial > designated initializers not supported > > that needs to be sorted out (post-merge is OK). cbl_field_data_t data = { .memsize = ca

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-11 Thread Richard Biener
anch on gcc.gnu.org git and tomorrow from there to trunk. Richard. > > Bob Dubner > > > -Original Message- > > From: Richard Biener > > Sent: Friday, March 7, 2025 07:27 > > To: James K. Lowden > > Cc: Jakub Jelinek ; gcc-patches@gcc.gnu.org > &

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-11 Thread James K. Lowden
On Mon, 10 Mar 2025 17:34:40 +0100 Richard Biener wrote: > index 10a42cb1dd7..8e18ef1 100644 > --- a/gcc/Makefile.in > +++ b/gcc/Makefile.in > ... > +# user-defined functions for GCOBOL > +udfdir = $(datadir)/gcobol/udf > .. > @@ -4031,7 +4035,9 @@ installdirs: > $(mkinstalldirs) $(DE

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-11 Thread Richard Biener
On Thu, Mar 6, 2025 at 11:50 PM James K. Lowden wrote: > > On Wed, 5 Mar 2025 11:43:16 +0100 > Richard Biener wrote: > > > > In short, despite not trying to support DESTDIR, we do anyway, by > > > happy accident. And we are now better informed. > > > > Thanks. Checking cobol-patched again I see

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-11 Thread Richard Biener
* gmath.h: New file. * io.h: New file. * libgcobol.h: New file. * valconv.h: New file. * libgcobol.cc: New file. * intrinsic.cc: New file. > > Richard. > > > > > Bob Dubner > > > > > -Original Message---

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-11 Thread Richard Biener
On Mon, Mar 10, 2025 at 7:07 PM James K. Lowden wrote: > > On Mon, 10 Mar 2025 17:34:40 +0100 > Richard Biener wrote: > > > index 10a42cb1dd7..8e18ef1 100644 > > --- a/gcc/Makefile.in > > +++ b/gcc/Makefile.in > > ... > > +# user-defined functions for GCOBOL > > +udfdir = $(datadir)/gcobol/ud

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-11 Thread David Malcolm
On Mon, 2025-03-10 at 19:07 +0100, Richard Biener wrote: > On Mon, Mar 10, 2025 at 5:34 PM Richard Biener > wrote: > > > > On Sat, Mar 8, 2025 at 12:12 AM Robert Dubner > > wrote: > > > > > > Richard and Jakub, and everybody else who has offered advice and > > > help > > > > > > I trust you re

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-10 Thread Richard Biener
On Mon, Mar 10, 2025 at 10:40 PM David Malcolm wrote: > > On Mon, 2025-03-10 at 19:07 +0100, Richard Biener wrote: > > On Mon, Mar 10, 2025 at 5:34 PM Richard Biener > > wrote: > > > > > > On Sat, Mar 8, 2025 at 12:12 AM Robert Dubner > > > wrote: > > > > > > > > Richard and Jakub, and everybody

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-10 Thread James K. Lowden
On Mon, 10 Mar 2025 18:05:21 +0100 Jakub Jelinek wrote: > Designated initializers are C++20, so you should just avoid that. So, > I'd recommend just: > cbl_field_data_t data = { /* memsize= */capacity_cast(len), > /* capacity= */capacity_cast(len), >

RE: The COBOL front end, version 3, now in 14 easy pieces

2025-03-07 Thread Robert Dubner
Message- > From: Richard Biener > Sent: Friday, March 7, 2025 07:27 > To: James K. Lowden > Cc: Jakub Jelinek ; gcc-patches@gcc.gnu.org > Subject: Re: The COBOL front end, version 3, now in 14 easy pieces > > On Fri, Mar 7, 2025 at 11:34 AM Richard Biener > wrote: &

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-07 Thread Richard Biener
On Fri, Mar 7, 2025 at 11:34 AM Richard Biener wrote: > > On Thu, Mar 6, 2025 at 11:50 PM James K. Lowden > wrote: > > > > On Wed, 5 Mar 2025 11:43:16 +0100 > > Richard Biener wrote: > > > > > > In short, despite not trying to support DESTDIR, we do anyway, by > > > > happy accident. And we are

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-06 Thread James K. Lowden
On Wed, 5 Mar 2025 11:43:16 +0100 Richard Biener wrote: > > In short, despite not trying to support DESTDIR, we do anyway, by > > happy accident. And we are now better informed. > > Thanks. Checking cobol-patched again I see Hi Richard, I have regenerated and force-pushed cobol-patched. It

RE: The COBOL front end, version 3, now in 14 easy pieces

2025-03-05 Thread Robert Dubner
> -Original Message- > From: Jakub Jelinek > Sent: Wednesday, March 5, 2025 10:58 > To: Robert Dubner > Cc: Richard Biener ; James K. Lowden > ; gcc-patches@gcc.gnu.org > Subject: Re: The COBOL front end, version 3, now in 14 easy pieces > > On Wed, Mar 0

RE: The COBOL front end, version 3, now in 14 easy pieces

2025-03-05 Thread Robert Dubner
> -Original Message- > From: Jakub Jelinek > Sent: Wednesday, March 5, 2025 10:58 > To: Robert Dubner > Cc: Richard Biener ; James K. Lowden > ; gcc-patches@gcc.gnu.org > Subject: Re: The COBOL front end, version 3, now in 14 easy pieces > > On Wed, Mar 0

RE: The COBOL front end, version 3, now in 14 easy pieces

2025-03-05 Thread Robert Dubner
> -Original Message- > From: Richard Biener > Sent: Wednesday, March 5, 2025 10:50 > To: Robert Dubner > Cc: Jakub Jelinek ; James K. Lowden > ; gcc-patches@gcc.gnu.org > Subject: Re: The COBOL front end, version 3, now in 14 easy pieces > > On Wed, Ma

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-05 Thread Jakub Jelinek
On Wed, Mar 05, 2025 at 09:47:45AM -0600, Robert Dubner wrote: > > -Original Message- > > From: Jakub Jelinek > > Sent: Wednesday, March 5, 2025 08:35 > > To: Richard Biener > > Cc: James K. Lowden ; gcc-patches@gcc.gnu.org > > Subject: Re: The COBOL

RE: The COBOL front end, version 3, now in 14 easy pieces

2025-03-05 Thread Robert Dubner
> -Original Message- > From: Jakub Jelinek > Sent: Wednesday, March 5, 2025 08:35 > To: Richard Biener > Cc: James K. Lowden ; gcc-patches@gcc.gnu.org > Subject: Re: The COBOL front end, version 3, now in 14 easy pieces > > On Wed, Mar 05, 2025 at 12:46:48PM +01

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-05 Thread Richard Biener
On Wed, Mar 5, 2025 at 4:47 PM Robert Dubner wrote: > > > -Original Message- > > From: Jakub Jelinek > > Sent: Wednesday, March 5, 2025 08:35 > > To: Richard Biener > > Cc: James K. Lowden ; gcc-patches@gcc.gnu.org > > Subject: Re: The COBOL fron

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-05 Thread Jakub Jelinek
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. Agr

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-05 Thread Richard Biener
On Tue, Mar 4, 2025 at 7:18 PM James K. Lowden wrote: > > On Tue, 4 Mar 2025 00:08:16 +0100 > Jakub Jelinek wrote: > > > On Mon, Mar 03, 2025 at 05:21:38PM -0500, James K. Lowden wrote: > > > However IMO, the incantation: > > > > > > make install DESTDIR=/foo > > > > > > is invalid. The comp

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-05 Thread Richard Biener
On Wed, Mar 5, 2025 at 12:46 PM Richard Biener wrote: > > On Wed, Mar 5, 2025 at 11:43 AM Richard Biener > wrote: > > > > On Tue, Mar 4, 2025 at 7:18 PM James K. Lowden > > wrote: > > > > > > On Tue, 4 Mar 2025 00:08:16 +0100 > > > Jakub Jelinek wrote: > > > > > > > On Mon, Mar 03, 2025 at 05:

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-05 Thread Richard Biener
On Wed, Mar 5, 2025 at 11:43 AM Richard Biener wrote: > > On Tue, Mar 4, 2025 at 7:18 PM James K. Lowden > wrote: > > > > On Tue, 4 Mar 2025 00:08:16 +0100 > > Jakub Jelinek wrote: > > > > > On Mon, Mar 03, 2025 at 05:21:38PM -0500, James K. Lowden wrote: > > > > However IMO, the incantation: >

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-04 Thread James K. Lowden
On Tue, 4 Mar 2025 00:08:16 +0100 Jakub Jelinek wrote: > On Mon, Mar 03, 2025 at 05:21:38PM -0500, James K. Lowden wrote: > > However IMO, the incantation: > > > > make install DESTDIR=/foo > > > > is invalid. The compiler's library search path is fixed when the > > compiler is built, base

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-03 Thread Jakub Jelinek
On Mon, Mar 03, 2025 at 05:21:38PM -0500, James K. Lowden wrote: > However IMO, the incantation: > > make install DESTDIR=/foo > > is invalid. The compiler's library search path is fixed when the > compiler is built, based on configure options. Installing into an > arbitrary directory canno

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-03 Thread James K. Lowden
On Mon, 24 Feb 2025 14:51:27 +0100 Richard Biener wrote: > > Our repository is > > > > https://gitlab.cobolworx.com/COBOLworx/gcc-cobol/ > > > > using branch > > > > cobol-stage > > > > I tested these patches using "git apply" to an unpublished branch > > "cobol-patched". > > I h

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-02-27 Thread James K. Lowden
On Mon, 24 Feb 2025 14:51:27 +0100 Richard Biener wrote: > Compiling a Cobol Hello World results in > > > ./install/gcc-cobol/usr/local/bin/gcobol t.cob > /usr/bin/ld: cannot find -lgcobol: No such file or directory > collect2: error: ld returned 1 exit status > > possibly because the 64bit lib

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-02-24 Thread Richard Biener
On Tue, Feb 25, 2025 at 2:48 AM James K. Lowden wrote: > > On Mon, 24 Feb 2025 14:51:27 +0100 > Richard Biener wrote: > > > On Wed, Feb 19, 2025 at 12:38?AM James K. Lowden > > wrote: > > > > > > The following 14 patches constitute 105,720 lines of code in 83 > > > files to build and document th

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-02-24 Thread James K. Lowden
On Mon, 24 Feb 2025 14:51:27 +0100 Richard Biener wrote: > On Wed, Feb 19, 2025 at 12:38?AM James K. Lowden > wrote: > > > > The following 14 patches constitute 105,720 lines of code in 83 > > files to build and document the COBOL front end. [...] > > I tested these patches using "git apply" t

Re: The COBOL front end, version 3, now in 14 easy pieces (+NIST)

2025-02-24 Thread Andi Kleen
"James K. Lowden" writes: >> Having a minimal harness in GCCs testsuite is critical - I'd expect a >> gcc/testsuite/gcobol.dg/dg.exp supporting execution tests. I assume >> Cobol has a way to exit OK or fatally and this should be >> distinguished as testsuite PASS or FAIL. > > Yes, a COBOL pro

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-02-24 Thread James K. Lowden
On Mon, 24 Feb 2025 14:51:27 +0100 Richard Biener wrote: > Installing the result via make install DESTDIR=/foo I see both a > 'gcobol' and a 'gcobc' program > being installed - is that intentional? Yes, that is intentional. gcobol is the compiler driver, as you know. gcobc is a shell script t

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-02-24 Thread James K. Lowden
On Mon, 24 Feb 2025 14:51:27 +0100 Richard Biener wrote: > gcc-cobol/gcc/cobol/parse.y:1361.10-16: error: require bison 3.5.1, > but have 3.0.4 > %require "3.5.1" //3.8.2 also works, but not 3.8.0 > ^^^ > > this requirement isn't documented, neither is a version requirement >

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-02-24 Thread Richard Biener
On Wed, Feb 19, 2025 at 12:38 AM James K. Lowden wrote: > > The following 14 patches constitute 105,720 lines of code in 83 files > to build and document the COBOL front end. The messages are > in a more or less logical order. We have: > > 1/14 4K dir: create gcc/cobol and libgcobol directorie

Re: The COBOL front end, version 3, now in 14 easy pieces (+NIST)

2025-02-22 Thread Richard Kenner
Paul Koning wrote: > >> As I mentioned in other posts, IMO (IANAL) the copyright in > >> unimportant and probably unenforceable. The National Computing > >> Centre no longer exists, and the document was also published by NIST > >> which, as part of the US government, does not copyright its > >> p

Re: The COBOL front end, version 3, now in 14 easy pieces (+NIST)

2025-02-21 Thread Paul Koning
> On Feb 21, 2025, at 2:23 PM, Florian Weimer wrote: > > * Paul Koning: > >>> On Feb 21, 2025, at 1:59 PM, Florian Weimer wrote: >>> >>> * James K. Lowden: >>> As I mentioned in other posts, IMO (IANAL) the copyright in unimportant and probably unenforceable. The National Computi

Re: The COBOL front end, version 3, now in 14 easy pieces (+NIST)

2025-02-21 Thread Florian Weimer
* James K. Lowden: > As I mentioned in other posts, IMO (IANAL) the copyright in > unimportant and probably unenforceable. The National Computing > Centre no longer exists, and the document was also published by NIST > which, as part of the US government, does not copyright its > publications. I

Re: The COBOL front end, version 3, now in 14 easy pieces (+NIST)

2025-02-21 Thread James K. Lowden
On Fri, 21 Feb 2025 13:00:13 +0100 Richard Biener wrote: > > Branches in git don't have independent permissions. If we use > > gcc.gnu.org git, are we granted commit rights with the priviso that > > we color inside the lines, and commit only to our own branches? > > My expectation is that by co

Re: The COBOL front end, version 3, now in 14 easy pieces (+NIST)

2025-02-21 Thread Florian Weimer
* Paul Koning: >> On Feb 21, 2025, at 1:59 PM, Florian Weimer wrote: >> >> * James K. Lowden: >> >>> As I mentioned in other posts, IMO (IANAL) the copyright in >>> unimportant and probably unenforceable. The National Computing >>> Centre no longer exists, and the document was also published b

Re: The COBOL front end, version 3, now in 14 easy pieces (+NIST)

2025-02-21 Thread Paul Koning
> On Feb 21, 2025, at 1:59 PM, Florian Weimer wrote: > > * James K. Lowden: > >> As I mentioned in other posts, IMO (IANAL) the copyright in >> unimportant and probably unenforceable. The National Computing >> Centre no longer exists, and the document was also published by NIST >> which, as

Re: The COBOL front end, version 3, now in 14 easy pieces (+NIST)

2025-02-21 Thread James K. Lowden
On Fri, 21 Feb 2025 01:17:15 + (UTC) Joseph Myers wrote: > > The Makefile fetches the NIST archive from our website. > > The normal build and test process ("make" and "make check") must > never rely on any network connectivity. Fair enough. I haven't added the NIST tests and documenta

Re: The COBOL front end, version 3, now in 14 easy pieces (+NIST)

2025-02-21 Thread Richard Biener
On Thu, Feb 20, 2025 at 8:38 PM James K. Lowden wrote: > > On Thu, 20 Feb 2025 11:38:58 +0100 > Richard Biener wrote: > > > Can you clarify on the future development model for Cobol after it has > > been merged? Is the cobolworx gitlab still going to be the primary > > development location and c

Re: The COBOL front end, version 3, now in 14 easy pieces (+NIST)

2025-02-20 Thread Joseph Myers
On Thu, 20 Feb 2025, James K. Lowden wrote: > The Makefile fetches the NIST archive from our website. (We originally > got it from NIST, but their site was reorganized last year. The file > went missing, as apparently did my email to the webmaster. > Technology!) The file might have 100 targets

Re: The COBOL front end, version 3, now in 14 easy pieces (+NIST)

2025-02-20 Thread James K. Lowden
On Thu, 20 Feb 2025 11:38:58 +0100 Richard Biener wrote: > Can you clarify on the future development model for Cobol after it has > been merged? Is the cobolworx gitlab still going to be the primary > development location and changes should be made there and then merged > to the GCC side? I w

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-02-20 Thread Richard Biener
On Wed, Feb 19, 2025 at 12:38 AM James K. Lowden wrote: > > The following 14 patches constitute 105,720 lines of code in 83 files > to build and document the COBOL front end. The messages are > in a more or less logical order. We have: > > 1/14 4K dir: create gcc/cobol and libgcobol directorie