diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.java index 73f9fab6229..04fea22edf9 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.java @@ -962,7 +962,8 @@ public class CompleteParseASTTest extends CompleteParseBaseTest public void testBug39551B() throws Exception { - IASTVariable variable = (IASTVariable)parse("_Imaginary double id = 99.99 * __I__;", true, ParserLanguage.C).getDeclarations().next(); //$NON-NLS-1$ + //this used to be 99.99 * __I__, but I don't know where the __I__ came from, its not in C99, nor in GCC + IASTVariable variable = (IASTVariable)parse("_Imaginary double id = 99.99 * 1i;", true, ParserLanguage.C).getDeclarations().next(); //$NON-NLS-1$ assertEquals( variable.getName(), "id"); //$NON-NLS-1$ assertTrue( ((IASTSimpleTypeSpecifier)variable.getAbstractDeclaration().getTypeSpecifier()).isImaginary() ); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ParserProblemFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ParserProblemFactory.java index 108592167c1..6904ef1fbb3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ParserProblemFactory.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ParserProblemFactory.java @@ -39,7 +39,8 @@ public class ParserProblemFactory extends BaseProblemFactory if( checkBitmask( id, IProblem.INTERNAL_RELATED ) ) return createInternalProblem( id, start, end, line, file, arg, warn, error ); - if ( checkBitmask( id, IProblem.SYNTAX_RELATED ) ) + if ( checkBitmask( id, IProblem.SYNTAX_RELATED ) || + checkBitmask( id, IProblem.SEMANTICS_RELATED) ) return super.createProblem( id, start, diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java index 9434fcd9fc0..d6cd625a9b8 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java @@ -1383,7 +1383,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto rhs = rhs.getTypeSymbol().getTypeInfo(); } - if( !lhs.isType(ITypeInfo.t__Bool, ITypeInfo.t_enumerator ) && + if( !lhs.isType(ITypeInfo.t__Bool, ITypeInfo.t_enumerator ) || !rhs.isType(ITypeInfo.t__Bool, ITypeInfo.t_enumerator ) ) { handleProblem( scope, IProblem.SEMANTIC_INVALID_CONVERSION_TYPE, null );