mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-01 13:25:45 +02: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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -7566,6 +7566,18 @@ public class AST2Tests extends AST2TestBase {
|
||||||
parseAndCheckBindings(true);
|
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 version = 0;
|
||||||
// int NextVersion() {
|
// int NextVersion() {
|
||||||
// return __atomic_add_fetch(&version, 1, 5);
|
// return __atomic_add_fetch(&version, 1, 5);
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* Sergey Prigogin (Google)
|
* Sergey Prigogin (Google)
|
||||||
* Thomas Corbat (IFS)
|
* Thomas Corbat (IFS)
|
||||||
* Anders Dahlberg (Ericsson) - bug 84144
|
* Anders Dahlberg (Ericsson) - bug 84144
|
||||||
|
* Justin You (Synopsys) - bug 84144
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser;
|
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);
|
skipBrackets(IToken.tLPAREN, IToken.tRPAREN, IToken.tSEMI);
|
||||||
switch (LTcatchEOF(1)) {
|
switch (LTcatchEOF(1)) {
|
||||||
case IToken.tAMPERASSIGN:
|
case IToken.tAMPERASSIGN:
|
||||||
case IToken.tAND:
|
|
||||||
case IToken.tARROW:
|
case IToken.tARROW:
|
||||||
case IToken.tARROWSTAR:
|
case IToken.tARROWSTAR:
|
||||||
case IToken.tASSIGN:
|
case IToken.tASSIGN:
|
||||||
|
|
Loading…
Add table
Reference in a new issue