🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4908

Paradox due to A7.1 Pointer generation rule

#4908
From: Vishv Malhotra
Date: Mon, 18 Mar 1996 22:48
28 lines
1020 bytes
In the following function a++; is acceptable but b++; is not.

	void foo(int a[20]) {
		int b[20];

		a++;
		b++;
	}

I understand the reason, but I wish to know if there is any thought
on elimination the anomaly?

Perhaps, I should state my problem more clearly, in K&R on page 115
where command line arguments are being explained the diagram for argv
corresponds to the declaration

	char *(*argv)[]

I have never seen such a declaration! Nor does this seem to work on
my compiler. Is the diagram on page 115 not true representation of
ANSI C standard?

Vishv
--

Vishv Malhotra
vmm@probitas.cs.utas.edu.au
Technical Details
Message-ID: <4ikp70$mkf@franklin.its.utas.edu.au>
Path: arc1-ca.pugleaf.net!tasman.its.utas.edu.au!vmm

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!tasman.its.utas.edu.au!vmm
From: vmm@tasman.its.utas.edu.au (Vishv Malhotra)
Newsgroups: comp.std.c
Subject: Paradox due to A7.1 Pointer generation rule
Date: 18 Mar 1996 22:48:00 GMT
Organization: University of Tasmania, Australia.
Message-ID: <4ikp70$mkf@franklin.its.utas.edu.au>
NNTP-Posting-Host: tasman.its.utas.edu.au
X-Newsreader: NN version 6.5.0 #6 (NOV)