GithubHelp home page GithubHelp logo

Comments (7)

Neuromancer42 avatar Neuromancer42 commented on July 24, 2024 1

Thank you for the hint for debug. I've found the root cause and the solution.

The keyword __int128 is added into the keyword list of the scanner CPreprocessor only when GCC version >= 4.7. By default, no GCC version is set and thus the keyword is not identified.

So the solution is setting GCC version number by setting the key __GNUC__ and __GNUC_MINOR__ in the Map<String, String> definedSymbols. Then __int128 can be parsed.

from cdt.

jonahgraham avatar jonahgraham commented on July 24, 2024

Can you add instructions on how to build and run your example, I get:

$ java cdtdemo.Main
Error: Unable to initialize main class cdtdemo.Main
Caused by: java.lang.NoClassDefFoundError: org/eclipse/core/runtime/CoreException

from cdt.

jonahgraham avatar jonahgraham commented on July 24, 2024

FWIW the sample you have works if I open it in a CDT editor, but there is something odd happening around the * __Y; as if I remove the ; I don't get an error:

image

but I do get an error if I remove the ; on the next line I do:

image

from cdt.

Neuromancer42 avatar Neuromancer42 commented on July 24, 2024

Can you add instructions on how to build and run your example, I get:

$ java cdtdemo.Main
Error: Unable to initialize main class cdtdemo.Main
Caused by: java.lang.NoClassDefFoundError: org/eclipse/core/runtime/CoreException

It can be runned by ./gradlew run.cdtdemo

from cdt.

Neuromancer42 avatar Neuromancer42 commented on July 24, 2024

FWIW the sample you have works if I open it in a CDT editor, but there is something odd happening around the * __Y; as if I remove the ; I don't get an error:

image

but I do get an error if I remove the ; on the next line I do:

image

The strange thing is that the IASTProblem (actually CASTProblemStatement I think) locates itself at an 8 in __int128

from cdt.

jonahgraham avatar jonahgraham commented on July 24, 2024

The issue is the __int128 correct? I am not sure what the solution is, I recommend having a look at the CDT test suite org.eclipse.cdt.core.parser.tests.ast2.AST2TestBase.parse(String, ParserLanguage, boolean, boolean, int) to see if that guides you.

from cdt.

jonahgraham avatar jonahgraham commented on July 24, 2024

That is great to hear. I'll close this issue now.

from cdt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.