[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnubol: gcc compile error w/COBOL



Matthew,

I have researched this further.

The ATTRIBUTE_UNUSED is there to suppress a warning that a
paremeter to a function is unused; the attribute is there to say
"this parameter is deliberately unused". It is a renaming of the
GCC intrinsic __attribute__(unused).  But the build will work
without it. 

That attribute is not relevant to the prototype therefore it is
not in the prototype.

It should be in the file <ansidecl.h> or "ansidecl.h". In linux
there is an <ansidecl.h> which does not include ATTRIBUTE_UNUSED.
I suspect that is where the problem lies. I should have used
"gansidecl.h" not <ansidecl.h>. 

#include "ansidecl.h" has a different search path than
<ansidecl.h> and you are probably picking up the <> linux
version. So try changing the <ansidecl.h> to "gansidecl.h". I
have made the changes myself but everything is broken while I put
in the garbage collection so I don't know for sure if is works.
Should be back up on the weekend some time and I will load the
fixed version at that time if it works.

The other thing is to run the build of the C first and only then
build the cobol as per the previous email. 
Let me know how you go. 

Tim Josling

Matthew Vanecek wrote:
> ...
> At line 1506 in cobpre.c, ATTRIBUTE_UNUSED is included in the function
> definition for some reason.  Didn't think it was supposed to be there,
> as it's not in the prototype.  Build goes along pretty well without
> that, until it reaches a point of looking for install-sh or install.sh.
> Thought I had autogen installed--I'll double check.
> 
> I've got a more-or-less RedHat system as well.  gcc is 2.95.2.  Think I
> need autogen to finish the build, though...I'll double check that and
> try again after work tonight
> 
> --
> Matthew Vanecek
> Visit my Website at http://mysite.directlink.net/linuxguy
> For answers type: perl -e 'print

--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.