Skip to content

Instantly share code, notes, and snippets.

@arsenm
Created February 19, 2013 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save arsenm/4989997 to your computer and use it in GitHub Desktop.
Save arsenm/4989997 to your computer and use it in GitHub Desktop.
volatile address space initializer
// Compiles successfully
__attribute__((address_space(42)))
volatile float arst[10] = { 0.0f };
/*
as_initializer.cpp:8:20: error: cannot initialize an array element of type
'__attribute__((address_space(42))) float' with an rvalue of type 'float'
float asdf[10] = { 0.0f };
*/
__attribute__((address_space(42)))
float asdf[10] = { 0.0f };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment