www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/07/20:03:09

From: Weiqi Gao <weiqigao AT a DOT crl DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Q: what's the difference between 'X' and '__X__'?
Date: Tue, 07 Jul 1998 23:00:01 +0000
Organization: CRL Network Services
Lines: 20
Message-ID: <35A2A871.121DC5D3@a.crl.com>
References: <01bdaa6b$8b24a8a0$e822b0c2 AT Giedrius DOT omnitel DOT net>
NNTP-Posting-Host: a116019.stl1.as.crl.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

GiedriusS wrote:
> 
> I'm a beginner and I'd like to know what's the difference between,
> for example, 'asm' and '__asm__' or 'volatile' and '__volatile__' etc.?

Many C ompilers were implemented before the ANSI C standard, and don't
know about the standard's requirement that vendor extensions to either
the C language or the standard C libraries should use a leading double
underscore or a leading single underscore for keywords and function
names of such extensions.

Many compilers introduced the _X or __X names, and switches to turn off
the no underscore names to be compliant with the standard.  This is
usually accompanied by advises that the no underscore names are kept for
backward compatibility and any new code should be written to use the
underscored names.

--
Weiqi Gao
weiqigao AT a DOT crl DOT com

- Raw text -


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