Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Feb 2011 13:20:58 +0100
From:      "Julian H. Stacey" <jhs@berklix.com>
To:        hackers@freebsd.org
Subject:   man 3 getopt char * const argv[] - is const wrong ?
Message-ID:  <201102131221.p1DCKxRY077335@fire.js.berklix.net>

next in thread | raw e-mail | index | archive | help
Hi Hackers
Ref.: man 3 getopt
	int getopt(int argc, char * const argv[], const char *optstring);

Ref.: K&R 2nd Ed P.211 last indent, 2nd sentence
	The purpose of const is to announce objjects that may be
	placed in read-only memory, and perhaps to increas opportunities
	for optimization

optstring is obviously const, 
but I don't see that argv can calim to be const ?

Did some ISO standard redefine const ? If so URL please ?
(I learnt my C from K&R #1 decades ago :-)

Cheers,
Julian
-- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
  Reply below indented '> ' original, to read like a play script, in order.
  Mail plain text format;  Not quoted-printable, Not HTML, Not base 64.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102131221.p1DCKxRY077335>