#249483 cfortran: should support calls with more than 27 arguments

Package:
cfortran
Source:
cfortran
Submitter:
Teemu Ikonen
Date:
2023-02-26 18:21:02 UTC
Severity:
wishlist
Tags:
#249483#5
Date:
2004-05-17 10:46:23 UTC
From:
To:
Hi,

When trying to compile a trivial program which uses mathlib, I get the
following compiler errors:

In file included from ddjmnb.cc:21:
/usr/include/gen.h:1135: error: NEWPTQ' was not declared in this scope
/usr/include/gen.h:1135: error: newptq' was not declared in this scope
/usr/include/gen.h:1135: error: DOUBLE' was not declared in this scope
/usr/include/gen.h:1135: error: DOUBLE' was not declared in this scope
/usr/include/gen.h:1135: error: DOUBLE' was not declared in this scope
/usr/include/gen.h:1135: error: DOUBLE' was not declared in this scope
/usr/include/gen.h:1135: error: DOUBLE' was not declared in this scope
/usr/include/gen.h:1135: error: PDOUBLE' was not declared in this scope

[the list goes on for a screenful or so]

After I comment out the offending definition

PROTOCCALLSFSUB29(NEWPTQ,newptq,DOUBLE,DOUBLE,DOUBLE,DOUBLE,...
#define NEWPTQ(A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,A15,A16,A17,A18,A19,A20,A21,A22,A23,A24,A25,A26,A27,A28,A29)
 CCALLSFSUB29(NEWPTQ,newptq,DOUBLE,DOUBLE,DOUBLE,DOUBLE$

from gen.h, everything works fine. Maybe the C preprocessor chokes on the
long macro definition? The gcc version I'm using is

gcc (GCC) 3.3.3 (Debian 20040401)

Best wishes,

Teemu

#249483#10
Date:
2004-05-17 15:03:21 UTC
From:
To:
I've reproduced the error and will look into it.  Thanks.
#249483#15
Date:
2004-05-17 18:32:11 UTC
From:
To:
clone 249423 -1
reassign -1 cfortran
retitle -1 cfortran: should support calls with more than 27 arguments
severity -1 wishlist
thanks

I don't know whether cpp is capable or not of handling such long macro
definitions, but the immediate problem is that cfortran.h only has support
for up to 27 arguments in a function/subroutine call, so there is no
PROTOCCALLSFSUB29 or CCALLSFSUB29 macro available.  Apparently whoever
wrote (or more likely autogenerated) the gen.h header didn't realize this.

I'll comment out the prototype in mathlib's gen.h for now, but of course
the long-term solution is to make cfortran support more arguments (so I'm
cloning this as a wishlist bug to cfortran).

regards,

#249483#28
Date:
2009-10-14 19:29:44 UTC
From:
To:
tags 249483 + wontfix
thanks

Fixing this bug will need a rewrite of cfortran, therefore tag as wont fix.

Bastien