On Tue 2024-04-30 13:52:16, Hanke Zhang via Gcc wrote:
> Hi
> I'm trying to format my code in GCC style.
> 
> But I don't know how to finish it. I try `indent` and
> `check_GNU_style.sh` in the `contrib` directory. But none of them seem
> to work well.
> 
> So I wondered is there any official tools to do that?
> 
> Thanks
> Hanke Zhang

Hi Hanke,

Not sure if this will help you but this is what I use: While writing code in
GCC style, I use the vim options listed here:

https://gcc.gnu.org/wiki/FormattingCodeForGCC

Then, before I submit a patch I run it through check_GNU_style.sh.  This works
fine for me.

Cheers,
Filip Kastl

Reply via email to