Comments (2)
Werror is disabled in many places already. It is good practice to take warnings seriously but if Werror creates more trouble than it solves we should disable it by default.Uwe
--Dr.-Ing. Uwe WoessnerHigh Performance Computing Center Stuttgart
mobile: +49-173-7028729office: +49-711-6856-5790http://www.hlrs.de/people/woessner/
-------- Ursprüngliche Nachricht --------
Von: Stefan Zellmann [email protected]
Datum: 07.02.2016 14:22 (GMT+01:00)
An: hlrs-vis/covise [email protected]
Betreff: [covise] Warnings from 3rdparty headers and -Werror (#20)
I keep getting warnings like the following on Ubuntu 15.04 and 15.10:
In file included from /usr/lib/openmpi/include/mpi.h:253:0,
from /home/zellmans/covise/src/OpenCOVER/cover/coVRMSController.h:25,
from /home/zellmans/covise/src/OpenCOVER/cover/coVRPluginList.cpp:17:
/usr/lib/openmpi/include/mpi_portable_platform.h:374:34: error: invalid suffix on literal; C++11 requires a space between literal and string macro [-Werror=literal-suffix]
_STRINGIFY(__GNUC__)"."_STRINGIFY(__GNUC_MINOR__)"."_STRINGIFY(__GNUC_PATCHLEVEL__)
^
/usr/lib/openmpi/include/mpi_portable_platform.h:374:63: error: invalid suffix on literal; C++11 requires a space between literal and string macro [-Werror=literal-suffix]
_STRINGIFY(__GNUC__)"."_STRINGIFY(__GNUC_MINOR__)"."_STRINGIFY(__GNUC_PATCHLEVEL__)
I think this has to do with C++11 raw string literals that can optionally be pre- and suffixed with some token for disambiguation.
Unfortunately, with -Werror activated, I need to care about this. It is only clear on second sight that errors like these are actually warnings - I mean, gcc reports *error: invalid suffix on literal", and only appends the warning code as the only means for clarification.
I personally think that treating warnings as errors is only viable for compilation units that don't include 3rdparty headers and would argue that we generally deactivate this GCC option.
Reply to this email directly or view it on GitHub:
#20
from covise.
I think it's good if code compiles without warnings: this will make you notice the warnings that are introduced by new changes, and occasionally these warnings point to real problems which might be overlooked in the first place.
The policy of defaulting to -Werror in general helps to keep warnings down. Especially as with recent GCCs it's very easy to disable the treatment of warnings as errors selectively, we should stick to this policy.
In this special case adding -Wno-error=literal-suffix
to cmake/Using/UseMPI.cmake should help.
from covise.
Related Issues (20)
- Oddlot HOT 7
- OSG Header issue HOT 4
- Configure ODDlot issue HOT 2
- Oddlot Import Map issue HOT 2
- CMakeLists.txt in src/kernel/CMakeLists.txt HOT 1
- when I run the oddlot, it is always inform me that Could not load prototypes.odd HOT 4
- oddlot does not exist HOT 2
- Unable to install the docker image HOT 1
- Error while installing ODDLOT using the docker build HOT 3
- Covise Build Issue HOT 2
- Interactor crash
- oddlot opendrive editing tutorial HOT 3
- OddLOT left/right lane HOT 2
- Separate OddLOT from remaining repo/tools HOT 4
- How to build a new clothoid (spiral) road with OddLOT HOT 2
- error: oddlot does not exist HOT 2
- COVER gets stuck when changing min/max in Color plugin
- Module id after restart HOT 1
- Could oddlot load points HOT 10
- ODDLot import or load a heightmap HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from covise.