Skip to content

Commit

Permalink
Remove [[ noreturn ]], MSVC14 doesn't yet support attributes?
Browse files Browse the repository at this point in the history
  • Loading branch information
lefticus committed Jan 15, 2015
1 parent f95ca75 commit 759d6fc
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ else()
add_definitions(-Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wcast-qual -Woverloaded-virtual -pedantic ${CPP11_FLAG})

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_definitions(-Weverything -Wno-c++98-compat -Wno-documentation -Wno-switch-enum -Wno-weak-vtables -Wno-sign-conversion -Wno-missing-prototypes -Wno-padded)
add_definitions(-Weverything -Wno-c++98-compat -Wno-documentation -Wno-switch-enum -Wno-weak-vtables -Wno-sign-conversion -Wno-missing-prototypes -Wno-padded -Wno-missing-noreturn)
else()
add_definitions(-Wnoexcept)
endif()
Expand Down
2 changes: 1 addition & 1 deletion include/chaiscript/dispatchkit/bootstrap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ namespace chaiscript
}
}

static void throw_exception [[ noreturn ]] (const Boxed_Value &bv) {
static void throw_exception(const Boxed_Value &bv) {
throw bv;
}

Expand Down
12 changes: 5 additions & 7 deletions samples/fun_call_performance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
#include <list>
#include <regex>

#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif

#include <chaiscript/chaiscript.hpp>
#include <chaiscript/chaiscript_stdlib.hpp>

Expand Down Expand Up @@ -154,10 +157,6 @@ void help(int n) {
}
}

void version(int){
std::cout << "chai: compiled " << __TIME__ << " " << __DATE__ << std::endl;
}

std::string helloWorld(const std::string &t_name)
{
return "Hello " + t_name + "!";
Expand Down Expand Up @@ -297,7 +296,6 @@ int main(int argc, char *argv[])
chai.add(chaiscript::fun(&myexit), "exit");
chai.add(chaiscript::fun(&myexit), "quit");
chai.add(chaiscript::fun(&help), "help");
chai.add(chaiscript::fun(&version), "version");
chai.add(chaiscript::fun(&throws_exception), "throws_exception");
chai.add(chaiscript::fun(&get_eval_error), "get_eval_error");

Expand Down Expand Up @@ -356,7 +354,7 @@ int main(int argc, char *argv[])
}
}
else if (arg == "-v" || arg == "--version") {
arg = "version(0)";
arg = "version()";
}
else if (arg == "-h" || arg == "--help") {
arg = "help(-1)";
Expand Down Expand Up @@ -388,7 +386,7 @@ int main(int argc, char *argv[])
printf("**ChaiScript::time= %.10f\n", elapsed_secs1);
break;
}
default: std::cout << "Unrecognized execution mode" << std::endl; return EXIT_FAILURE;

}
}
catch (const chaiscript::exception::eval_error &ee) {
Expand Down
2 changes: 2 additions & 0 deletions samples/inheritance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class BaseClass
{
}

BaseClass(const BaseClass &) = default;

virtual ~BaseClass() {}

virtual std::string doSomething(float, double) const = 0;
Expand Down
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,11 @@ std::string get_next_command() {

// We have to wrap exit with our own because Clang has a hard time with
// function pointers to functions with special attributes (system exit being marked NORETURN)
void myexit [[ noreturn ]] (int return_val) {
void myexit(int return_val) {
exit(return_val);
}

void interactive [[ noreturn ]] (chaiscript::ChaiScript& chai)
void interactive(chaiscript::ChaiScript& chai)
{
using_history();

Expand Down Expand Up @@ -331,8 +331,8 @@ int main(int argc, char *argv[])
try {
switch ( mode ) {
case eInteractive:
// interactive never returns, no need for break;
interactive(chai);
break;
case eCommand:
val = chai.eval(arg);
break;
Expand Down

11 comments on commit 759d6fc

@lefticus
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AddMoreWarningFlags (lefticus) - x86_64-Linux-Ubuntu-14.04-clang-3.5: OK (331 of 331 tests passed)

Build Badge Test Badge

@lefticus
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lefticus
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AddMoreWarningFlags (lefticus) - i386-Windows-8.1-VisualStudio-14: Build Failed

Build Badge Test Badge

@lefticus
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AddMoreWarningFlags (lefticus) - x86_64-Linux-Ubuntu-14.04-clang-3.5-AddressSanitizer: OK (328 of 331 tests passed)

Build Badge Test Badge

@lefticus
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AddMoreWarningFlags (lefticus) - Win64-Windows-8.1-VisualStudio-14: Build Failed

Build Badge Test Badge

@lefticus
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AddMoreWarningFlags (lefticus) - i386-Windows-8.1-VisualStudio-12: Build Failed

Build Badge Test Badge

@lefticus
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AddMoreWarningFlags (lefticus) - x86_64-Linux-Ubuntu-14.04-clang-3.5-ThreadSanitizer: OK (331 of 331 tests passed)

Build Badge Test Badge

@lefticus
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AddMoreWarningFlags (lefticus) - Win64-Windows-8.1-VisualStudio-12: Build Failed

Build Badge Test Badge

@lefticus
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AddMoreWarningFlags (lefticus) - x86_64-Linux-Ubuntu-14.04-gcc-4.8: OK (331 of 331 tests passed)

Build Badge Test Badge

@lefticus
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AddMoreWarningFlags (lefticus) - x86_64-Linux-Ubuntu-14.04-gcc-4.6: Build Failed

Build Badge Test Badge

@lefticus
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AddMoreWarningFlags (lefticus) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.68: OK (0 of 0 tests passed)

Build Badge

Please sign in to comment.