Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - C versus C++: (2 Items)
   
C versus C++  
With 4.2.1, I take a C program and force it to be compile by the C++ compiler.  The compilation takes about twice as 
long (this is also true with 3.3.5).

Is this normal behavior?

- Mario
Re: C versus C++  
> 
> With 4.2.1, I take a C program and force it to be compile by the C++ compiler.
>   The compilation takes about twice as long (this is also true with 3.3.5).
> 
> Is this normal behavior?

It's expected that C++ takes longer to compile than C. With 4.2.1 you can see where the time is being spent in the 
compiler by using the -Wc,-ftime-report option. I would expect the difference in times would be doing the parsing and 
name lookups.

Regards,

Ryan Mansfield