[Bug c/66527] incorrect line number in diagnostics for multiline initializers

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 16 21:48:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66527

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Here's a slightly different test case showing a similar problem and pointing
out that the issue isn't specific to initializers.  Also, the warning at the
end is incorrect (probably the fallout from the prior errors).

int foo (register int a, register int b)
{
    return
    *
    (
    a
    ?
    &
    a
    :
    &
    b
    );
}
u.c: In function ‘foo’:
u.c:10:5: error: address of register variable ‘a’ requested
     :
     ^
u.c:13:5: error: address of register variable ‘b’ requested
     );
     ^
u.c:14:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^


More information about the Gcc-bugs mailing list