Re: RDP on Minix-386 (Albert S Woodhull)
29 Jan 1997 11:47:30 -0500

          From comp.compilers

Related articles
RDP on Minix-386 (1997-01-26)
Re: RDP on Minix-386 (1997-01-29)
Re: RDP on Minix-386 (1997-01-30)
| List of all articles for this month |

From: (Albert S Woodhull)
Newsgroups: comp.os.minix,comp.compilers
Followup-To: comp.os.minix,comp.compilers
Date: 29 Jan 1997 11:47:30 -0500
Organization: Hampshire College, Amherst MA
References: 97-01-217
Keywords: tools, C

> One of the porting challenges was when the ACK compiler protested that
> some functions were called with more arguments than its limit.
> Although I have gotten past that problem, I am curious to know if I am
> correct in the assumption that the ANSI spec. explicitly permits a
> limit for the number of arguments to a variadic function? If so, I
> can report the problem as a legitimate "bug" which needs my fix :-).

This is an interesting question, to which I assumed the answer would
be yes, of course there is a limit. However, in tracking down all
references to argument lists and variable argument lists in K&R 2nd
ed. (1988), Plauger and Brodie's Standard C Reference (1996), Lewine's
POSIX Programmer's Guide (1992) and the Posix standard itself I can't
find any discussion of a limit to the number of arguments.

However, POSIX refers to the ARG_MAX macro, which defines the number
of bytes available for the combined argument and environment lists for
an exec(). POSIX calls for this to have a minumum size of 4096. Larger
values are permitted, and the sysconf() call can be used to find the
actual limit.

> I am also curious to know if there is any interest within this group
> in the results. In particular, I could use some help in fleshing out
> the C grammar to the point where it might serve as a "lint" program or

I certainly think a lint for Minix would be of interest.

  Albert S. Woodhull
  Hampshire College, Amherst, MA

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.