| delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| From: | "Dave Korn" <dave DOT korn AT artimi DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| References: | <1cbe225f0704160234u24b104a5o9b459178e895a5a8 AT mail DOT gmail DOT com> <1cbe225f0704160713q567ae44fg3d5cb1a9c1e0ab03 AT mail DOT gmail DOT com> |
| Subject: | RE: C++ name with leading underscore character not Compiling |
| Date: | Mon, 16 Apr 2007 15:27:57 +0100 |
| Message-ID: | <01ad01c78033$6db14510$2e08a8c0@CAM.ARTIMI.COM> |
| MIME-Version: | 1.0 |
| X-Mailer: | Microsoft Office Outlook 11 |
| In-Reply-To: | <1cbe225f0704160713q567ae44fg3d5cb1a9c1e0ab03@mail.gmail.com> |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
On 16 April 2007 15:14, Chelton Evans wrote:
> Pre fixing the underscore character is a technique that was around
> before the language evolved.
> The compilers that I had used I had not encountered this before.
:-) Welcome to the post K'n'R world. Things have changed a lot since
pre-1989; there's nothing else for it really, old code just has to be tidied
up.
> However after this discussion I will add the underscore character to
> the end of a variable instead of the start
This is a well-used and fairly standard technique, particularly in
function-like macros where you want to avoid the risk of clashing with a
variable in the enclosed function.
> I went and checked the pre-processed code and a macro substitution had
> ocurred.
Heh, knew it. Glad it's all cleared up now.
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |