Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot parse multi-line character literal #675

Closed
kamphaus opened this issue Apr 16, 2018 · 0 comments
Closed

Cannot parse multi-line character literal #675

kamphaus opened this issue Apr 16, 2018 · 0 comments

Comments

@kamphaus
Copy link
Contributor

When trying to parse a character literal that's part of an array initialization on multiple lines, the parsing fails and outputs a warning.

E.g. :

typedef unsigned char pcre_uchar;
#define CHAR_NBSP                   ((unsigned char)'\xa0')

static const pcre_uchar TEST[] =  {
  'x', (pcre_uchar) CHAR_NBSP, '\n', '\0' };

gives the warning:
// Warning (CharacterLiteral): /home/ck/go/src/github.com/elliotchance/c2go/tests/cast2.c:20 : could not read exact character literal: cannot parse character literal: illegal character 'a' at index 0 from atic const pcre_uchar TEST[] = {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant