delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/13/01:01:58

From: Jack Klein <jackklein AT spamcop DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Names allowed in macros
Message-ID: <3dvsktck2fpqdk4i4n83t187tit829bl1m@4ax.com>
References: <9ilcop$pdt$2 AT info DOT cyf-kr DOT edu DOT pl>
X-Newsreader: Forte Agent 1.8/32.548
MIME-Version: 1.0
Lines: 34
Date: Fri, 13 Jul 2001 04:51:12 GMT
NNTP-Posting-Host: 12.84.2.229
X-Complaints-To: abuse AT worldnet DOT att DOT net
X-Trace: bgtnsc04-news.ops.worldnet.att.net 994999872 12.84.2.229 (Fri, 13 Jul 2001 04:51:12 GMT)
NNTP-Posting-Date: Fri, 13 Jul 2001 04:51:12 GMT
Organization: AT&T Worldnet
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Fri, 13 Jul 2001 00:32:07 +0200, "Rafal Maj (Raf256)"
<raf256 AT go2 DOT pl> wrote in comp.os.msdos.djgpp:

> Hi,
> please don't be angry that I'm sending so meany post, but I'm serious
> working on UPT...
> 
> I't looks like DJGPP don't allow to use @ character in macros... is it a bug
> ?
> 
> --- file @beta.h ---
> #ifndef include_ AT beta_H
> #define include_ AT beta_H included
> 
> --- report ---
> @beta.h(2) Warning:  garbage at end of `#ifndef' argument
> @beta.h(3) Warning:  missing white space after `#define include_'

Both the C and C++ language standards have identical specifications
for all symbol names, whether they are macros or not.  The ASCII '@'
character is not in the required character set so a compiler is not
required to accept it in a symbol name.

There are a few compilers that do, but the vast majority of compilers
do not, so if you do this on a compiler that accepts it you are asking
for problems if you ever need to port the code.

-- 
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019