I'm trying to create a header file as such:
#import <UIKit/UIKit.h>
typedef void (^RevealBlock)();
@interface BFTasksViewController : UITableViewController <UITableViewDataSource, UITableViewDelegate> {
@private
RevealBlock _revealBlock;
}
- (id)initWithTitle:(NSString *)title withRevealBlock:(RevealBlock)revealBlock;
@end
But I get this warning:
Redefinition of typedef 'RevealBlock' is a C11 feature
Is this something to be worried about? I'm looking at the GHSidebarNav project, which seems to use it just fine.
You must have declared RevealBlock
somewhere else, as i don't see any import other than UIKit/UIKit.h, check you project .pch
file for conflicting headers (or could it be that you removed some headers to make the snippet shorter ?).
Is this something to be worried about?
If you are compiling a C or ObjC program and the compiler does not support C11, then the compiler should reject the program (GCC 4.2-Apple/LLVM as an example you or somebody using your program may be using). Note that C++ has supported multiple definitions for many years.
Of course, these definitions which appear in multiple files must always match where you use them as the same type. Otherwise, the compiler may set the parameters up incorrectly before the call is made.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With