Wed Jun 07 11:05:07 2017: Request 121464 was acted upon. Transaction: Correspondence added by ppisar Queue: Wx Subject: Compile fails with "error: expected identifier before string constant" from /CORE/unicode_constants.h Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: ken...@cpan.org Status: open Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=121464 >
Dne St 07.čen.2017 10:46:19, ppisar napsal(a): > Dne Ne 30.dub.2017 05:37:28, KENTNL napsal(a): > > In file included from > > /home/kent/perl5/perlbrew/perls/5.25.12-nossp-sip13-nopmc- > > nodot/lib/5.25.12/x86_64-linux/CORE/utf8.h:30:0, > > from > > /home/kent/perl5/perlbrew/perls/5.25.12-nossp-sip13-nopmc- > > nodot/lib/5.25.12/x86_64-linux/CORE/regexp.h:21, > > from > > /home/kent/perl5/perlbrew/perls/5.25.12-nossp-sip13-nopmc- > > nodot/lib/5.25.12/x86_64-linux/CORE/perl.h:3914, > > from ../../cpp/wxapi.h:57, > > from RichText.c:23: > > /home/kent/perl5/perlbrew/perls/5.25.12-nossp-sip13-nopmc- > > nodot/lib/5.25.12/x86_64-linux/CORE/unicode_constants.h:72:22: > > error: expected identifier before string constant > > # define BOM_UTF8 "\xEF\xBB\xBF" /* U+FEFF */ > > ^ > > /usr/include/wx-2.8/wx/convauto.h:54:9: note: in expansion of macro > > ‘BOM_UTF8’ > > BOM_UTF8 > > ^ > > /usr/include/wx-2.8/wx/convauto.h Wx header file defines BOM_UTF8 enum > value: > > class WXDLLIMPEXP_BASE wxConvAuto : public wxMBConv > { > private: > // all currently recognized BOM values > enum BOMType > { > BOM_None, > BOM_UTF32BE, > BOM_UTF32LE, > BOM_UTF16BE, > BOM_UTF16LE, > BOM_UTF8 > }; > } > > While Perl's CORE/unicode_constants.h defines a same-named macro: > > # define BOM_UTF8 "\xEF\xBB\xBF" /* U+FEFF */ > > String literals cannot be enum values. Because BOM_UTF8 belongs to public Perl API and it's private to Wx, I think Wx should rename it.