MS equivalent of GCC's -fno-common

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



http://rafb.net/p/Egb3jc19.nln.html

The above code compiles and links with MS c compiler 13.10.
cl /c /Wall first.cpp
cl /c /Wall second.cpp
link first.obj second.obj

This links perfectly fine without complaining about ABC being
redefined. GCC does the same unless -fno-common option is used in
which case it places uninitialized global variables in the data
section instead of a common bucked and thereby the linker screams. Is
there a similar option for MS compilers.

GCC and MS compilers dont show this problem in C++ mode though.

thanks
bks

.



Relevant Pages

  • Re: Which PIC18 C Compiler?
    ... Walter gave a good answer regarding recursion in 8051 compilers, totally unrelated to gcc and/or sdcc (since there is no gcc port for the 8051). ... But in my experience on ColdFire's and PPC's, it has generated similar to or better than the few commercial compilers I have seen. ...
    (comp.arch.embedded)
  • Re: math.nroot [was Re: A brief question.]
    ... >>> Ah, but as I've said before, virtually all C compilers on 754 boxes ... >>> happy to use gcc, they all could have used the older gcc spellings ... > use glibc, they all could have used the older glibc spellings. ... for setting traps) interfaces, and I can't be arsed to go through old ...
    (comp.lang.python)
  • Re: Gnu tools for ARM Cortex development
    ... by smart guys like Walter, and the CPU designers like ARM, will beat GCC. ... contest against Intel, Sun, Microsoft and LLVM compilers: ... of source level debugging information. ... Top range debuggers will be able to fake some of this based on debugging information from the compiler, ...
    (comp.arch.embedded)
  • Re: math.nroot [was Re: A brief question.]
    ... >> happy to use gcc, they all could have used the older gcc spellings ... parings of C compilers and C runtime libraries are ... use glibc, they all could have used the older glibc spellings. ... trap doesn't actually fire until the _next_ fp operation ...
    (comp.lang.python)
  • Re: What is Linux built with? (or, what does this question mean?)
    ... Isn't the kernel/distro nearly always built w/ gcc? ... Now some of us actually have other compilers as well and these could be ... specific to provide cache and other optimizing that can't be generic. ... gnu compile in a way that it gives some registers over to the kernel as far ...
    (alt.os.linux.suse)