What is GCC_NO_COMMON_BLOCKS used for?

I found that my project is setting

GCC_NO_COMMON_BLOCKS = NO 

under Apple LLVM Compiler 3.1 - Code settings as "No shared blocks"

enter image description here

I would like to know: what is this flag used for?

Thank you so much

+21
ios objective-c xcode llvm
Jun 27 '12 at 19:01
source share
1 answer

From Xcode's quick help:

In C, even uninitialized global variables are allocated in the data section of the object file, and not generated as general blocks. This leads to the fact that if the same variable is declared (without extern) in two different compilations, you will receive an error message when you bind them. The only reason this can be useful is to make sure that the program will work on other systems that always work that way.

You can find quick help in the right pane under the "Show Quick Help Inspector" tab: Xcode Quick Help Inspector

+31
Jun 27 2018-12-12T00:
source share



All Articles