🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Jordan K Hubbard Fri, 04 Sep 1992 09:35
Why does gcc 2.2.2 allow function pointer arithmetic?
#1061
Author: Jordan K Hubbard
Date: Fri, 04 Sep 1992 09:35
15 lines
761 bytes
/* gcc 2.2.2 allows constructs like: */

main()
{
	void (*foo)(), (*bar)();

	printf("%x - %x = %x\n", foo, bar, foo - bar);

	/* As well as ... */

	printf("Yow!  This is zero: %d\n", sizeof(*foo));
}

/* no other C compiler tested so far (native solaris 1, hppa, ibm RS600 )
   allows this */
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads