[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Alternating results on spacing on nested parentheses on the first statem
From: |
pythonian23 |
Subject: |
Alternating results on spacing on nested parentheses on the first statement of a function with a pointer |
Date: |
Tue, 9 Apr 2024 23:23:32 +0900 |
User-agent: |
Mozilla Thunderbird |
Hello! I have found an inconsistency in how indent handles nested
parentheses, as the email subject says. I've tried to work out what
causes and doesn't cause it below:
indent -linux indent.c result 1
void bug_1(int (*parentheses_pointer), int after)
{
((0 == 0) || (0 == 1));
}
void bug_2(int (*parentheses_pointer))
{
if ((0 == 0) || (0 == 1))
return;
}
void bug_3(int before, int (*parentheses_pointer))
{
((0 == 0) || (0 == 1));
}
void bug_4(int (*parentheses_pointer), int after)
{
((0 == 0) || (0 == 1));
}
void bug_5(void (*function_pointer)(void))
{
((0 == 0) || (0 == 1));
}
void fine_1(int variable)
{
((0 == 0) || (0 == 1));
}
void fine_2(int (*parentheses_pointer))
{
statement();
((0 == 0) || (0 == 1));
}
void fine_3(int *normal_pointer)
{
((0 == 0) || (0 == 1));
}
indent -linux indent.c result 2
void bug_1(int (*parentheses_pointer), int after)
{
( (0 == 0) ||(0 == 1));
}
void bug_2(int (*parentheses_pointer))
{
if( (0 == 0) ||(0 == 1))
return;
}
void bug_3(int before, int (*parentheses_pointer))
{
( (0 == 0) ||(0 == 1));
}
void bug_4(int (*parentheses_pointer), int after)
{
( (0 == 0) ||(0 == 1));
}
void bug_5(void (*function_pointer)(void))
{
( (0 == 0) ||(0 == 1));
}
void fine_1(int variable)
{
((0 == 0) || (0 == 1));
}
void fine_2(int (*parentheses_pointer))
{
statement();
((0 == 0) || (0 == 1));
}
void fine_3(int *normal_pointer)
{
((0 == 0) || (0 == 1));
}
I hope this helps! Thanks for everything GNU! <3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Alternating results on spacing on nested parentheses on the first statement of a function with a pointer,
pythonian23 <=