Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address reflection for variables is broken #3

Open
asutton opened this issue Aug 10, 2017 · 1 comment
Open

Address reflection for variables is broken #3

asutton opened this issue Aug 10, 2017 · 1 comment

Comments

@asutton
Copy link
Owner

asutton commented Aug 10, 2017

The value printed by the following function is garbage.

int var = 42;
int main() {
  constexpr variable_info v = reflexpr(var);
  printf("%d\n", v.get<int>());
}
@asutton
Copy link
Owner Author

asutton commented Aug 10, 2017

I think this might be computing the symbol address and then dereferencing that. We probably want to extract the variable or string computed by the immediate call and then return the address of that object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant