Skip to content

Arguments like `-D__forceinline="__attribute__((always_inline))"` seem to mess up gccdiag

Specifically I get this error multiple times:

<command-line>: error: expected identifier or '(' before string constant
<command-line>: note: in definition of macro '__forceinline'

Or something like this for another definition -D__weak="__attribute__((weak))"

<command-line>: error: expected identifier or '(' before string constant
[file name omitted].h:485:1: note: in expansion of macro '__weak'
  485 | __weak void GPIO_Line15_Interrupt(void);
      | ^~~~~~

I get these errors seemingly once for every use, although I for the first example I don't even get a reference to which line/file

I guess it has something to do with string escaping in the command line arguments, this works okay for actually building the project using cmake/ninja