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

Incorrect description of initialization #17

Open
DanielaE opened this issue Jan 24, 2022 · 0 comments
Open

Incorrect description of initialization #17

DanielaE opened this issue Jan 24, 2022 · 0 comments

Comments

@DanielaE
Copy link

Page 43

"Of course, it is uninitialized (unless it is declared at global namespace scope), ..."
This is independent of the global namespace but rather applies to all variable definitions at namespace scope, i.e. variables with static storage duration [basic.start.static]

int a;
namespace N1 {
    int b = 1;
    namespace N2 {
        int c = 2;
    }
}

compiles to

a:          .zero   4
N1::b:      .long   1
N1::N2::c:  .long   2

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