Hi Matthew,

thanks a lot for all your hints.

On Sun, Jan 12, 2020 at 02:08:56PM -0800, Matthew Fernandez wrote:
> > 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.

Thanks for this pointer.

> 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.

I admit I do not understand your "but -Wattributes ...".  I can confirm
that this patch[1] builds the package successfully.

> You might need to bump that GCC issue with some evidence that the bug still 
> exists and see what the maintainers say.

I need to admit that I understand so less from all the gcc issues you
tried to explain - I do not even have any idea what C++ attributes are.
I simply cared for that Debian bug since nobody else did. :-(
So I feel really incompetent to discuss this with gcc maintainers but
I'd welcome if you bring it up there.

> 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.

Hmmm, as I said my patch[1] works and I just have the gut feeling (as I
said I have no competence!) that this might be better than to delete the
attribute.  If not would you mind sending an alternative patch which is
better in your opinion?

Thanks again


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



Reply via email to