mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-08-04 02:07:53 +00:00
Added gcc version specific fix for pragma ignores
This commit is contained in:
@@ -75,6 +75,9 @@ class CMockGenerator
|
||||
file << plugin_includes if (!plugin_includes.empty?)
|
||||
file << "\n"
|
||||
file << "/* Ignore the following warnings, since we are copying code */\n"
|
||||
file << "#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)\n"
|
||||
file << "#pragma GCC diagnostic ignored \"-Wpragmas\"\n"
|
||||
file << "#endif\n"
|
||||
file << "#pragma GCC diagnostic ignored \"-Wunknown-pragmas\"\n"
|
||||
file << "#pragma GCC diagnostic ignored \"-Wduplicate-decl-specifier\"\n"
|
||||
file << "\n"
|
||||
|
||||
@@ -151,6 +151,9 @@ class SystemTestGenerator
|
||||
out.puts("#include \"#{include}\"")
|
||||
end
|
||||
out.puts('')
|
||||
out.puts("#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)")
|
||||
out.puts("#pragma GCC diagnostic ignored \"-Wpragmas\"")
|
||||
out.puts("#endif")
|
||||
out.puts('#pragma GCC diagnostic ignored "-Wunknown-pragmas"')
|
||||
out.puts('#pragma GCC diagnostic ignored "-Wduplicate-decl-specifier"')
|
||||
out.puts('')
|
||||
@@ -167,6 +170,9 @@ class SystemTestGenerator
|
||||
out.puts("#include \"#{include}\"")
|
||||
end
|
||||
out.puts('')
|
||||
out.puts("#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)")
|
||||
out.puts("#pragma GCC diagnostic ignored \"-Wpragmas\"")
|
||||
out.puts("#endif")
|
||||
out.puts('#pragma GCC diagnostic ignored "-Wunknown-pragmas"')
|
||||
out.puts('#pragma GCC diagnostic ignored "-Wduplicate-decl-specifier"')
|
||||
out.puts('')
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
[Released under MIT License. Please refer to license.txt for details]
|
||||
========================================== */
|
||||
|
||||
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
|
||||
#pragma GCC diagnostic ignored "-Wpragmas"
|
||||
#endif
|
||||
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
|
||||
#pragma GCC diagnostic ignored "-Wduplicate-decl-specifier"
|
||||
|
||||
|
||||
@@ -95,6 +95,9 @@ class CMockGeneratorTest < Test::Unit::TestCase
|
||||
"#include \"PluginRequiredHeader.h\"\n",
|
||||
"\n",
|
||||
"/* Ignore the following warnings, since we are copying code */\n",
|
||||
"#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)\n",
|
||||
"#pragma GCC diagnostic ignored \"-Wpragmas\"\n",
|
||||
"#endif\n",
|
||||
"#pragma GCC diagnostic ignored \"-Wunknown-pragmas\"\n",
|
||||
"#pragma GCC diagnostic ignored \"-Wduplicate-decl-specifier\"\n",
|
||||
"\n",
|
||||
@@ -136,6 +139,9 @@ class CMockGeneratorTest < Test::Unit::TestCase
|
||||
"#include \"PluginRequiredHeader.h\"\n",
|
||||
"\n",
|
||||
"/* Ignore the following warnings, since we are copying code */\n",
|
||||
"#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)\n",
|
||||
"#pragma GCC diagnostic ignored \"-Wpragmas\"\n",
|
||||
"#endif\n",
|
||||
"#pragma GCC diagnostic ignored \"-Wunknown-pragmas\"\n",
|
||||
"#pragma GCC diagnostic ignored \"-Wduplicate-decl-specifier\"\n",
|
||||
"\n",
|
||||
@@ -163,6 +169,9 @@ class CMockGeneratorTest < Test::Unit::TestCase
|
||||
"#include \"#{orig_filename}\"\n",
|
||||
"\n",
|
||||
"/* Ignore the following warnings, since we are copying code */\n",
|
||||
"#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)\n",
|
||||
"#pragma GCC diagnostic ignored \"-Wpragmas\"\n",
|
||||
"#endif\n",
|
||||
"#pragma GCC diagnostic ignored \"-Wunknown-pragmas\"\n",
|
||||
"#pragma GCC diagnostic ignored \"-Wduplicate-decl-specifier\"\n",
|
||||
"\n",
|
||||
@@ -191,6 +200,9 @@ class CMockGeneratorTest < Test::Unit::TestCase
|
||||
"#include \"PluginRequiredHeader.h\"\n",
|
||||
"\n",
|
||||
"/* Ignore the following warnings, since we are copying code */\n",
|
||||
"#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)\n",
|
||||
"#pragma GCC diagnostic ignored \"-Wpragmas\"\n",
|
||||
"#endif\n",
|
||||
"#pragma GCC diagnostic ignored \"-Wunknown-pragmas\"\n",
|
||||
"#pragma GCC diagnostic ignored \"-Wduplicate-decl-specifier\"\n",
|
||||
"\n",
|
||||
|
||||
Reference in New Issue
Block a user