🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.atari16
Article #1577

Re: Yet another Megamax C bug

#1577
From: Hugh Redelmeier
Date: Thu, 21 Aug 1986 17:24
21 lines
1616 bytes
In article <1557@cwruecmp.UUCP> bammi@cwruecmp.UUCP (Jwahar R. Bammi) writes:
>
>I came across the following bug in Megamax C's pre-processor. It does not
>substitute arguments enclosed in single quotes ('x'). My understanding
>is that the pre-processor should not substitute arguements in strings
>(ie within double quotes (")).
>
>For Example:
>#define BROKEN(x)	putc('x', stdout); putc('\n', stdout)
>	BROKEN(A);
>will always print the character x no matter what the argument to BROKEN is.
>Alcyon (v 4.14) and Vax (bsd 4.3) print out the character A as i expect.

A compiler that substitutes for parameters within either kind of
quote will violate the current working draft of the X3J11 committee
of ANSI.  The Reiser pre-processor (used in most UNIX systems) does
do this substitution.  It is safest not to write anything that would
be treated differently by these interpretations.

Hugh Redelmeier (416) 922-1937
{utzoo, ihnp4, decvax}!hcr!hugh
Technical Details
Message-ID: <1392@hcrvx1.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!hcrvx1!hugh
References: <1557@cwruecmp.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site hcrvx1.UUCP
Path: arc1-ca.pugleaf.net!utzoo!hcrvx1!hugh
From: hugh@hcrvx1.UUCP (Hugh Redelmeier)
Newsgroups: net.micro.atari16
Subject: Re: Yet another Megamax C bug
Message-ID: <1392@hcrvx1.UUCP>
Date: Thu, 21-Aug-86 13:24:18 EDT
Article-I.D.: hcrvx1.1392
Posted: Thu Aug 21 13:24:18 1986
Date-Received: Fri, 22-Aug-86 03:34:10 EDT
References: <1557@cwruecmp.UUCP>
Reply-To: hugh@hcrvx1.UUCP (Hugh Redelmeier)
Distribution: world
Organization: Human Computing Resources, Toronto
Lines: 21
Keywords: MEGAMAX C PREPROCESSOR
Summary: not a bug