Skip to content

Redefinition of a variable #189

@dear-satan

Description

@dear-satan

Hi, In chapter 16.2.4 register there are code examples that say:

register int a[] = {11, 22, 33, 44, 55};

int a = *(a + 2);  // COMPILER ERROR! Address of a[0] taken

and

register int a[] = {11, 22, 33, 44, 55};

int a = a[2];  // COMPILER WARNING!

It appears that in both examples, the variable a is being redefined in the line int a = ..., which results in a different error than the one intended to be demonstrated, but I may be wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions