mirror of
https://github.com/eclipse-cdt/cdt
synced 2024-10-28 12:09:40 +01:00
Bug 84144 [Parser2] GCC: labels as values
add support for syntax int k = (int) && x; Signed-off-by: jyou13y <justin.you@synopsys.com> Change-Id: I3bb888b8930706b01c545794be4e054b025e641f
This commit is contained in:
parent
4ac73d7e0c
commit
6e7a509f9b
2 changed files with 15 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2004, 2014 IBM Corporation and others.
|
||||
* Copyright (c) 2004, 2015 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -7565,7 +7565,19 @@ public class AST2Tests extends AST2TestBase {
|
|||
public void testExpressionLabelReference_84144() throws Exception {
|
||||
parseAndCheckBindings(true);
|
||||
}
|
||||
|
||||
|
||||
// void f()
|
||||
// {
|
||||
// unsigned long long labelPtr;
|
||||
// labelPtr = (unsigned long long) &&L;
|
||||
// goto *labelPtr;
|
||||
// L:
|
||||
// return;
|
||||
// }
|
||||
public void testExpressionLabelReferenceCast_84144() throws Exception {
|
||||
parseAndCheckBindings(true);
|
||||
}
|
||||
|
||||
// int version = 0;
|
||||
// int NextVersion() {
|
||||
// return __atomic_add_fetch(&version, 1, 5);
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* Sergey Prigogin (Google)
|
||||
* Thomas Corbat (IFS)
|
||||
* Anders Dahlberg (Ericsson) - bug 84144
|
||||
* Justin You (Synopsys) - bug 84144
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.dom.parser;
|
||||
|
||||
|
@ -2556,7 +2557,6 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
|
|||
skipBrackets(IToken.tLPAREN, IToken.tRPAREN, IToken.tSEMI);
|
||||
switch (LTcatchEOF(1)) {
|
||||
case IToken.tAMPERASSIGN:
|
||||
case IToken.tAND:
|
||||
case IToken.tARROW:
|
||||
case IToken.tARROWSTAR:
|
||||
case IToken.tASSIGN:
|
||||
|
|
Loading…
Reference in a new issue