Skip to content

Instantly share code, notes, and snippets.

@mcpherrinm
Created December 10, 2014 01:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcpherrinm/22df94534a6b39daf511 to your computer and use it in GitHub Desktop.
Save mcpherrinm/22df94534a6b39daf511 to your computer and use it in GitHub Desktop.
Name resolution works in 4.5, not 4.7 & clang
extern const char * const foo = "hello world\n";
#include <stdio.h>
namespace SN {
void fn();
}
void SN::fn() {
extern const char * const foo;
printf("%s", foo);
}
int main() {
SN::fn();
return 0;
}
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