Re: preprocessed file issue
- From: Tim Roberts <timr@xxxxxxxxx>
- Date: Sun, 26 Oct 2008 16:08:00 -0700
George <George@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Here is my confusion, line 473 is empty... I posted the related content
around line 473.
Look, let's just summarize this and be done. Given the following .h file:
#if !defined(_CRT_NONSTDC_DEPRECATE)
#if defined(_CRT_NONSTDC_NO_WARNINGS) || defined(_POSIX_)
#define _CRT_NONSTDC_DEPRECATE(_NewName)
#else
#define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT("The POSIX name
for this item is deprecated. Instead, use the ISO C++ conformant name: "
#_NewName ". See online help for details.")
#endif
#endif
#ifndef _SIZE_T_DEFINED
#ifdef _WIN64
typedef unsigned __int64 size_t;
#else
typedef _W64 unsigned int size_t;
#endif
#define _SIZE_T_DEFINED
#endif
In that ENTIRE sequence, either ZERO or ONE line will pass through the
preprocessor to the resulting output file (specifically, one of the two
typedefs). The rest of them are all pre-processor directives that will be
removed.
So, in order to keep the compiler straight about which source line it is
reading so it can generate proper error messages, the pre-processor has two
choices. It can either send along a whole bunch of empty lines, or it can
skip the empty lines and use a #line directive to tell the compiler about
the lines that were skipped.
That's all there is to it. It doesn't matter which scheme it uses. It
doesn't matter if it generates extra #line directives. It is a private
communication between the pre-processor and the compiler. That's all.
There is no further use for this.
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
.
- Follow-Ups:
- Re: preprocessed file issue
- From: George
- Re: preprocessed file issue
- References:
- Re: preprocessed file issue
- From: Igor Tandetnik
- Re: preprocessed file issue
- From: George
- Re: preprocessed file issue
- From: Tim Roberts
- Re: preprocessed file issue
- From: George
- Re: preprocessed file issue
- From: Ben Voigt [C++ MVP]
- Re: preprocessed file issue
- From: George
- Re: preprocessed file issue
- From: Ben Voigt [C++ MVP]
- Re: preprocessed file issue
- From: George
- Re: preprocessed file issue
- From: Tim Roberts
- Re: preprocessed file issue
- From: George
- Re: preprocessed file issue
- Prev by Date: RE: Passing structs....
- Next by Date: Re: preprocessed file issue
- Previous by thread: Re: preprocessed file issue
- Next by thread: Re: preprocessed file issue
- Index(es):
Relevant Pages
|