Re: using /TC
From: Nick Savoiu (_s_a_v_o_i_u__at__ics_._uci_._edu_)
Date: 02/03/04
- Next message: peter: "Coding SNMP Manager"
- Previous message: Louis Solomon [SteelBytes]: "Re: Macros"
- In reply to: Bonj: "Re: using /TC"
- Next in thread: Hendrik Schober: "Re: using /TC"
- Reply: Hendrik Schober: "Re: using /TC"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 2 Feb 2004 18:28:51 -0800
Just a couple come to mind:
- no //comments
- having to specify 'struct' when declaring a struct variable
There probably are more...
Nick
"Bonj" <a@b.com> wrote in message
news:uF6Q1Ed6DHA.2764@TK2MSFTNGP09.phx.gbl...
> quirks.. such as?
>
> "Nick Savoiu" <_s_a_v_o_i_u_@_ics_._uci_._edu_> wrote in message
> news:u5yhi6E6DHA.3664@tk2msftngp13.phx.gbl...
> > If your code uses only C constructs, compiling it as C or C++ makes no
> > difference in performance. The most you gain from going to C are its
> quirks.
> >
> > Nick
> >
> > "Bonj" <a@b.com> wrote in message
> > news:#z5jmcD6DHA.1020@tk2msftngp13.phx.gbl...
> > > Well, I am writing a program without MFC or classes so I might aswell
> > > compile it with /TC for the extra performance benefits - as there's no
> > > reason why it has to be compiled as C++.
> > > I have now converted all the files to .c files instead of .cpp now in
> > order
> > > to achieve this.
> > >
> > >
> > > "Jeff Partch [MVP]" <jeffp@mvps.org> wrote in message
> > > news:uZ3d%23PC6DHA.2264@tk2msftngp13.phx.gbl...
> > > > "Bonj" <a@b.com> wrote in message
> > > > news:%23eReimB6DHA.2732@TK2MSFTNGP09.phx.gbl...
> > > > > Is it correct that functions can't have local variables in C code?
> > > > > Everything has to be global?
> > > > >
> > > > > Are there any other performance-saving benefits like this you gain
> > from
> > > > > using /TC?
> > > >
> > > > I don't have a lot of experience with /TC, as I find the syntax
> > > differences
> > > > between C++ and C to be significant enough that it doesn't really
> > > translate
> > > > very well. But I do write C code on a near-daily basis and the
> functions
> > > can
> > > > have local variables just fine. I can't see why the switch would
alter
> > > this,
> > > > nor can I see anything in its documentation that would lead me to
> expect
> > > it.
> > > > I also fail to grasp why a direct performance benefit would result
> from
> > > > compiling a non *.c file as C. What is the reason behind your
> questions?
> > > > --
> > > > Jeff Partch [VC++ MVP]
> > > >
> > > >
> > >
> > >
> >
> >
>
>
- Next message: peter: "Coding SNMP Manager"
- Previous message: Louis Solomon [SteelBytes]: "Re: Macros"
- In reply to: Bonj: "Re: using /TC"
- Next in thread: Hendrik Schober: "Re: using /TC"
- Reply: Hendrik Schober: "Re: using /TC"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|