Re: using /TC

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Nick Savoiu (_s_a_v_o_i_u__at__ics_._uci_._edu_)
Date: 02/03/04


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]
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: via irq quirk breakage
    ... You have an old VT82C686 south bridge, which was tagged as "special" by ... Alan, why were dev_lo and dev_hi both set to 0 for the VT82C868 in your ... Nick, I guess the following patch would work better for you? ... Fix VIA quirks that were recently broken by Alan Cox in the upstream ...
    (Linux-Kernel)
  • Re: One More Chapter for Your Perusal
    ... elanders has yet to specify ... further criteria relating to publication eg Amazon ranking, ... What I'm getting here, Nick, is that like you and Laura, this group is made up of benchwarmers. ...
    (alt.usage.english)
  • OT: application to open/close multiple applications
    ... Does anyone know of an application that can open/close multiple applications ... (that I specify) ... Nick ... Prev by Date: ...
    (sci.lang.translation)
  • Re: Setting a breakpoint on a bool
    ... > HTH, ... >> in a class in a namespace. ... >> If I just specify 'v' the program does not stop. ...
    (microsoft.public.vc.debugger)
  • Re: using /TC
    ... quirks.. ... The most you gain from going to C are its ... I am writing a program without MFC or classes so I might aswell ...
    (microsoft.public.vc.language)