Skip to content

C indenting: enclosing case values in switch construct causes wrong indentation #38

@GoogleCodeExporter

Description

@GoogleCodeExporter
In the following example some lines are indented too little:

#v+
void func()
{
    switch (foo)
    {
        case (bar):
            if (baz())
            quux(); // FIXME: this line should be indented more!
            break;
        case (shmoo):
            if (!bar)
        { // FIXME: this brace is indented too little
        }
        case (foo1):
            switch (bar)
        { // FIXME: this brace is indented too little
            case baz:
                baz_f();
                break;
        }
            break;
        default:
            baz();
            baz();
            break;
    }
}
#v-

Original issue reported on code.google.com by lech.lor...@gmail.com on 13 Dec 2011 at 10:10

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions