c, objc: Fix up c_parser_objc_selector_arg after CPP_SCOPE changes [PR94637]
authorJakub Jelinek <jakub@redhat.com>
Sun, 19 Apr 2020 10:13:33 +0000 (12:13 +0200)
committerJakub Jelinek <jakub@redhat.com>
Sun, 19 Apr 2020 10:13:33 +0000 (12:13 +0200)
commite1113ffbd619d0568fb3b37e9660d9e0ae7862f5
tree09b934e4b3623821ce9842b128072434f976171b
parent8a9ce39f8bbb2ae0798bec0ed2051a5f10b21122
c, objc: Fix up c_parser_objc_selector_arg after CPP_SCOPE changes [PR94637]

Similarly to inline asm, :: (or any other number of consecutive colons) can
appear in ObjC @selector argument and with the introduction of CPP_SCOPE
into the C FE, we need to trat CPP_SCOPE as two CPP_COLON tokens.
The C++ FE does that already that way.

2020-04-19  Jakub Jelinek  <jakub@redhat.com>

PR objc/94637
* c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
two CPP_COLON tokens.

* objc.dg/pr94637.m: New test.
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/objc.dg/pr94637.m [new file with mode: 0644]