More ANSI comment help wanted: #define void int vs. #define void char

Lawrence V. Cipriani lvc at tut.cis.ohio-state.edu
Mon Jun 6 12:53:01 AEST 1988


In article <8085 at elsie.UUCP> ado at elsie.UUCP (Arthur David Olson) writes:
	...
>The response I received (was marked "Not an official X3J11 document"),
>said that while "#define void char" might be better when it comes to pointers,
>there were other cases where "#define void int" was better.  Can anyone give a
>concrete example?

	void blob() { ... }

would become:

	int blob() { ... }

instead of:

	char blob() { ... }

Old C libraries commonly don't list the function return type to indicate a
void but it really means int.  The #define would retain compatibility with
the old libraries.  Anyone got better examples?

-- 
Larry Cipriani, AT&T Network Systems and Ohio State University
Domain: lvc at tut.cis.ohio-state.edu
Path: ...!cbosgd!osu-cis!tut.cis.ohio-state.edu!lvc (strange but true)



More information about the Comp.lang.c mailing list