Giter Club home page Giter Club logo

Comments (2)

Andriamanitra avatar Andriamanitra commented on September 24, 2024

Micro does not include a C++ compiler, the warning is coming from a linter or a language server you have set up. You should open the issue in their repository.

from micro.

dmaluka avatar dmaluka commented on September 24, 2024

I think @teodor256 did not "set up" anything. The issue is with micro's built-in linter plugin. It uses these commands for checking C or C++ files:

    makeLinter("gcc", "c", "gcc", {"-fsyntax-only", "-Wall", "-Wextra", "%f"}, "%f:%l:%c:.+: %m")
    makeLinter("g++", "c++", "gcc", {"-fsyntax-only","-std=c++14", "-Wall", "-Wextra", "%f"}, "%f:%l:%c:.+: %m")

So the problem is with gcc: it always throws #pragma once in main file if a file containing #pragma once is passed to the gcc command line, i.e. it assumes that header files should never be passed to it on the command line. Which is reasonable in normal case when compiling, but it also happens when gcc is run with -fsyntax-only. So gcc with -fsyntax-only cannot be quite reliably used for checking syntax of header files. And gcc doesn't even provide an explicit option to suppress this warning.

I see it is reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89808. See in particular comment https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89808#c11.

from micro.

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.