Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > C++ Precompiler: Same as C Precompiler?

Reply
Thread Tools

C++ Precompiler: Same as C Precompiler?

 
 
JohnQ
Guest
Posts: n/a
 
      06-11-2007
Is the C++ precompiler the same as a C precompiler? If not, how much
different is it?

John


 
Reply With Quote
 
 
 
 
Gianni Mariani
Guest
Posts: n/a
 
      06-11-2007
JohnQ wrote:
> Is the C++ precompiler the same as a C precompiler? If not, how much
> different is it?


I wonder if :

#define ABC( A, B )

ABC( std::map<T1,T2>, B )

is supposed to work in future C++ standard pre processors ?


 
Reply With Quote
 
 
 
 
Jerry Coffin
Guest
Posts: n/a
 
      06-11-2007
In article <xC0bi.7601$(E-Mail Removed)> ,
http://www.velocityreviews.com/forums/(E-Mail Removed) says...
> Is the C++ precompiler the same as a C precompiler? If not, how much
> different is it?


At least officially, they're currently different -- C99 added variadic
macros (for one example) that C++ doesn't have (yet). I believe the
intent is to add these in C++ 0x so they'll be the same again.

--
Later,
Jerry.

The universe is a figment of its own imagination.
 
Reply With Quote
 
JohnQ
Guest
Posts: n/a
 
      06-11-2007

"Jerry Coffin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In article <xC0bi.7601$(E-Mail Removed)> ,
> (E-Mail Removed) says...
>> Is the C++ precompiler the same as a C precompiler? If not, how much
>> different is it?

>
> At least officially, they're currently different -- C99 added variadic
> macros (for one example) that C++ doesn't have (yet). I believe the
> intent is to add these in C++ 0x so they'll be the same again.\


Oh! So the C precompiler is "more advanced" then the C++ one. I kinda like
that response. I hope the implication is a correct one.

John


 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      06-11-2007
JohnQ wrote:
> "Jerry Coffin" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> In article <xC0bi.7601$(E-Mail Removed)> ,
>> (E-Mail Removed) says...
>>> Is the C++ precompiler the same as a C precompiler? If not, how much
>>> different is it?

>> At least officially, they're currently different -- C99 added variadic
>> macros (for one example) that C++ doesn't have (yet). I believe the
>> intent is to add these in C++ 0x so they'll be the same again.\

>
> Oh! So the C precompiler is "more advanced" then the C++ one. I kinda like
> that response. I hope the implication is a correct one.
>

Preprocessor.

Don't forget that a) C99 isn't fully implemented by most C compilers and
b) variadic macros are of more use in C than they are in C++.

--
Ian Collins.
 
Reply With Quote
 
Jerry Coffin
Guest
Posts: n/a
 
      06-11-2007
In article <h53bi.18026$(E-Mail Removed) >,
(E-Mail Removed) says...

[ ... ]

> Oh! So the C precompiler is "more advanced" then the C++ one. I kinda like
> that response. I hope the implication is a correct one.


Keep in mind that I said "officially". I said it for a reason --
conforming implementations of C99 are pretty rare, and the only one of
which I'm aware (Comeau) also allows you to use the new preprocessor
when compiling C++ code if you want to; from a practical viewpoint,
there's not a whole lot of difference.

That said, yes, the C preprocessor is currently more advanced than the
C++ preprocessor.

--
Later,
Jerry.

The universe is a figment of its own imagination.
 
Reply With Quote
 
JohnQ
Guest
Posts: n/a
 
      06-11-2007

"Jerry Coffin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In article <h53bi.18026$(E-Mail Removed) >,
> (E-Mail Removed) says...
>
> [ ... ]
>
>> Oh! So the C precompiler is "more advanced" then the C++ one. I kinda
>> like
>> that response. I hope the implication is a correct one.

>
> Keep in mind that I said "officially". I said it for a reason --
> conforming implementations of C99 are pretty rare, and the only one of
> which I'm aware (Comeau) also allows you to use the new preprocessor
> when compiling C++ code if you want to; from a practical viewpoint,
> there's not a whole lot of difference.
>
> That said, yes, the C preprocessor is currently more advanced than the
> C++ preprocessor.


Ha! My thought was in hacking an existing precompiler (HP PCC, yeah way back
there), and replacing the one that came with VC++ maybe to harness the
templates concept to my liking?

John


 
Reply With Quote
 
JohnQ
Guest
Posts: n/a
 
      06-11-2007

"Ian Collins" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> JohnQ wrote:
>> "Jerry Coffin" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> In article <xC0bi.7601$(E-Mail Removed)> ,
>>> (E-Mail Removed) says...
>>>> Is the C++ precompiler the same as a C precompiler? If not, how much
>>>> different is it?
>>> At least officially, they're currently different -- C99 added variadic
>>> macros (for one example) that C++ doesn't have (yet). I believe the
>>> intent is to add these in C++ 0x so they'll be the same again.\

>>
>> Oh! So the C precompiler is "more advanced" then the C++ one. I kinda
>> like
>> that response. I hope the implication is a correct one.
>>

> Preprocessor.
>
> Don't forget that a) C99 isn't fully implemented by most C compilers and
> b) variadic macros are of more use in C than they are in C++.


Aside: I'm not worried about variadic macros. The only thing I'm "worried
about" is the C++ precompiler supporting C++isms (of only any that I use, of
course).

John


 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      06-11-2007
JohnQ wrote:
> "Ian Collins" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> JohnQ wrote:
>>> "Jerry Coffin" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> In article <xC0bi.7601$(E-Mail Removed)> ,
>>>> (E-Mail Removed) says...
>>>>> Is the C++ precompiler the same as a C precompiler? If not, how much
>>>>> different is it?
>>>> At least officially, they're currently different -- C99 added variadic
>>>> macros (for one example) that C++ doesn't have (yet). I believe the
>>>> intent is to add these in C++ 0x so they'll be the same again.\
>>> Oh! So the C precompiler is "more advanced" then the C++ one. I kinda
>>> like
>>> that response. I hope the implication is a correct one.
>>>

>> Preprocessor.
>>
>> Don't forget that a) C99 isn't fully implemented by most C compilers and
>> b) variadic macros are of more use in C than they are in C++.

>
> Aside: I'm not worried about variadic macros. The only thing I'm "worried
> about" is the C++ precompiler supporting C++isms (of only any that I use, of
> course).
>

Are you talking about some specific "precompiler" (if so, which?), or
the C++ preprocessor?

--
Ian Collins.
 
Reply With Quote
 
Robbie Hatley
Guest
Posts: n/a
 
      06-11-2007

"JohnQ" asked:

> Is the C++ precompiler the same as a C precompiler?
> If not, how much different is it?


There is no such thing as a "precompiler" in C or C++.
They are not "JIT" languages. Are you a Java programmer,
by any chance?

Or perhaps you mean the "preprocessor"? That is just a text
editor. It is not *any* kind of "compiler", pre-, post-,
or otherwise. It just edits text. No more, no less.

And yes, as far as I can tell, it's pretty much the same
for C and C++. There may be minor differences. Buy and
read the C and C++ standards, if you want the gory details:

http://webstore.ansi.org/ansidocstore/

They're cheap (at least, the electronic versions are)
and they answer many questions.

--
Cheers,
Robbie Hatley
lonewolf aatt well dott com
triple-dubya dott tustinfreezone dott org


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent two users from accessing the same file at the same time Shawn ASP .Net 2 02-19-2006 03:11 AM
how to use same user control x number of times on same asp page David Hubbard ASP .Net 2 01-12-2006 03:56 PM
Local LAN Access - Works for WinXP, No Go For Linux - Same Server,Same Laptop Marc Schwartz Cisco 0 06-18-2005 02:28 PM
Any problems with writing the information into a file - Multi-users perform writing the same file at the same time ???? HNguyen ASP .Net 4 12-21-2004 01:53 PM
Two PIX on same subnet with same gateway? This Old Man Cisco 4 10-20-2003 07:27 PM



Advertisments