Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » [[maybe_unused]] C++17([[maybe_unused]] Editor says Syntax Error but code compiles)
[[maybe_unused]] C++17 [message #1780878] Mon, 29 January 2018 14:11
Amanda M is currently offline Amanda MFriend
Messages: 2
Registered: January 2018
Junior Member
Hello Everyone,

Version: Photon (4.8): Build id: I20180124-2000
Fedora 27
g++ (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2)
jre: 9.0.4

I have recently migrated from Netbeans 8.2 to Eclipse 4.8. My software is using the c++17 [[maybe_unused]] attribute to silence -Wunused-parameter warnings for virtual functions. My code compiles without any warnings but the editor shows the relevant lines as a syntax error.

I have set the compiler's dialect to ISO C++ 1y and have rebuilt the Index. Whatever I try I cannot stop the editor from reporting syntax errors. Is this because Eclipse does not yet fully support the C++17 standard? If this is the case, is it worth me waiting for this to be supported or (if it's going to be a long time) should I refactor to use a more conventional way to to silence unused parameter warnings?

Many Thanks
Amanda

[Updated on: Mon, 29 January 2018 19:14]

Report message to a moderator

Previous Topic:"Check out as project configured using the New Project Wizard" creates empty project
Next Topic:Debugging from eclipse and gdb a remote aplication with openOCD server
Goto Forum:
  


Current Time: Fri Feb 23 05:24:30 GMT 2018

Powered by FUDForum. Page generated in 0.02338 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software