> -----Original Message----- > From: Rainer Orth <r...@cebitec.uni-bielefeld.de> > Sent: Monday, June 30, 2025 10:27 > To: Robert Dubner <rdub...@symas.com> > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [COMMITTED] cobol: Normalize generating and using > function_decls. > > Hi Robert, > > > These changes have been shown to generate more sensible code on both > > x86_64. > > > > On x86_64-pc-linux, a bootstrap build of --enable-languages=c,c++,cobol > > succeeded. > > this patch has one change (not listed in ChangeLog) that broke 32-bit > Solaris bootstrap: > > diff --git a/gcc/cobol/parse.y b/gcc/cobol/parse.y > index f0faaa41577..660b0b4c4c2 100644 > --- a/gcc/cobol/parse.y > +++ b/gcc/cobol/parse.y > @@ -12359,7 +12359,7 @@ numstr2i( const char input[], radix_t radix ) { > return output; > } > if( erc == -1 ) { > - yywarn("'%s' was accepted as %zu", input, integer); > + yywarn("'%s' was accepted as %ld", input, integer); > } > return output; > } > > This causes > > /vol/gcc/src/hg/master/local/gcc/cobol/parse.y: In function ‘real_value > numstr2i(const char*, radix_t)’: > /vol/gcc/src/hg/master/local/gcc/cobol/parse.y:12362:12: error: format > ‘%ld’ expects argument of type ‘long int’, but argument 3 has type > ‘std::size_t’ {aka ‘unsigned int’} [-Werror=format=] > 12362 | yywarn("'%s' was accepted as %ld", input, integer); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~ > | | > | std::size_t {aka > unsigned int} > > Returning to %zu obviously fixes this.
The fix has been pushed. > > Besides, I noticed > > diff --git a/gcc/cobol/Make-lang.in b/gcc/cobol/Make-lang.in > index bec81a6acc0..18eb3b0f1e5 100644 > --- a/gcc/cobol/Make-lang.in > +++ b/gcc/cobol/Make-lang.in > @@ -353,6 +353,13 @@ cobol.srcman: > > cobol.mostlyclean: > > +gcobol.clean: > +# This is intended for non-general use. It is a last-ditch effort to > flush > +# out all oject files and executable code for gcobol and libgcobol, > causing > +# a complete rebuild of all executable code. > + rm -fr gcobol cobol1 cobol/* \ > + ../*/libgcobol/* > + > > This is at least incomplete: in multilib builds, there are more > instances of libgcobol in <target triple>/<multilib subdir>/libgcobol. > > Rainer > > -- > -------------------------------------------------------------------------- > --- > Rainer Orth, Center for Biotechnology, Bielefeld University