MSBuild vs compiler

By C# compiler do you mean csc.exe? If that is what you mean, then csc and MSBuild are completely different applications. MSBuild uses a solution and project files to build the files in your project. MSBuild uses csc.exe as its actual compiler but knows where to find assemblies, references etc based on your solution and … Read more

Delegate caching behavior changes in Roslyn

Yes. The most important part is that the method containing lambda implementation is now an instance method. You can see a delegate as a middleman receiving an instance call through Invoke and dispatching that call according to the calling convention of the implementing method. Note that there are platform ABI requirements that specify how arguments … Read more

what is meanging of gcc option “-fmessage-length”?

I didnt find it in GCC Command-Line Options. That’s because you’re looking at “a modified version of the Command-Line Options section of the GCC Manual.” This is the official list of all possible GCC command-line options, which leads to this section: “3.7 Options to Control Diagnostic Messages Formatting”. This is what the section has to … Read more

Extract object (*.o) files from an iPhone static library

That’s because your CustomiPhoneLib.a is a fat library, i.e., a library that contains more than one target architecture, namely armv6 and armv7 on iOS. You can use lipo to extract a specific architecture into another .a file, use ar and ranlib to manipulate it at will, and then use lipo again to recombine the manipulated … Read more

Why do C and C++ compilers place explicitly initialized and default initialized global variables in different segments?

Neither language C or C++ has any notion of “segments”, and not all OSs do either, so your question is inevitably dependent on the platform and compiler. That said, common implementations will treat initialized vs. uninitialized variables differently. The main difference is that uninitialized (or default 0-initialized) data does not have to be actually saved … Read more

How does the compiler benefit from C++’s new final keyword?

I can think of one scenario where it might be helpful to the compiler from an optimisation perspective. I’m not sure if it’s worth the effort to compiler implementers, but it’s theoretically possible at least. With virtual call dispatch on a derived, final type you can be sure that there is nothing else deriving from … Read more