> On Jan 12, 2020, at 12:49, Andreas Tille <andr...@an3as.eu> wrote:
> 
> Hi,
> 
> I'm wondering how this bug
> 
> 
> rk1968/rk1968.cc: In lambda function:
> rk1968/rk1968.cc:237:103: error: expected '{' before '->' token
>  237 |         auto make_error_return = [&L] ( const char* fmt, ...) 
> __attribute__ ((format (printf, 2, 3))) -> int
>      |                                                                        
>                                ^~
> 
> 
> with gcc 9 can be fixed in aghermann.  Any help would be appreciated.

I think you’re hitting GCC bug #90333 [0]. This claims to have been fixed in 
r265787, but I can still reproduce this issue with GCC 9.2.1 that includes that 
commit. Turning this into a C++11 attribute ([[gnu::format(printf, 2, 3)]]) 
makes the parse error go away, but -Wattributes still indicates GCC is ignoring 
it. You might need to bump that GCC issue with some evidence that the bug still 
exists and see what the maintainers say. If you need to bypass this urgently, I 
would recommend deleting the attribute as that particular one is only used to 
aid the compiler in creating warnings.

  [0]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90333

Reply via email to