Created
December 10, 2014 01:00
-
-
Save mcpherrinm/22df94534a6b39daf511 to your computer and use it in GitHub Desktop.
Name resolution works in 4.5, not 4.7 & clang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern const char * const foo = "hello world\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
namespace SN { | |
void fn(); | |
} | |
void SN::fn() { | |
extern const char * const foo; | |
printf("%s", foo); | |
} | |
int main() { | |
SN::fn(); | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main: declare.o main.o | |
declare.o: declare.cc | |
main.o: main.cc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment