[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Incorrect pointer align
From: |
Nicolas Bock |
Subject: |
Incorrect pointer align |
Date: |
Mon, 10 Apr 2023 13:29:41 -0600 |
Hi,
The following code is aligned incorrectly using indent-2.2.12:
```C
#include <stdlib.h>
#define TYPED(name) name ## _typed
typedef void matrix_t;
void TYPED (testfunc) (void)
{
matrix_t*A = NULL;
matrix_t*B = NULL;
}
void testfunc (void)
{
matrix_t*A = NULL;
matrix_t*B = NULL;
}
```
```console
indent -par test.c
```
```diff
--- test.c 2023-04-10 13:21:00.516535705 -0600
+++ test-2.2.12.c 2023-04-10 13:21:04.172585827 -0600
@@ -6,12 +6,13 @@
void TYPED (testfunc) (void)
{
- matrix_t*A = NULL;
- matrix_t*B = NULL;
+ matrix_t * A = NULL;
+ matrix_t *B = NULL;
}
-void testfunc (void)
+void
+testfunc (void)
{
- matrix_t*A = NULL;
- matrix_t*B = NULL;
+ matrix_t *A = NULL;
+ matrix_t *B = NULL;
}
```
The pointer's indirection operator '*' for variable A is incorrectly
aligned in the first function definition. This is a regression from
indent-2.2.11.
Best,
Nick
- Incorrect pointer align,
Nicolas Bock <=