| |
@@ -0,0 +1,49 @@
|
| |
+ commit 08c76b1da6e132b1e91f82136a8647f71f774904
|
| |
+ Author: Nolan Poe <npgo22@gmail.com>
|
| |
+ Date: Fri Mar 15 19:21:08 2024 -0700
|
| |
+
|
| |
+ Fix GCC14 warnings on template specialization syntax (#4974) (#4975)
|
| |
+
|
| |
+ diff --git a/src/V3OptionParser.cpp b/src/V3OptionParser.cpp
|
| |
+ index b1855c462..e0d7fbd04 100644
|
| |
+ --- a/src/V3OptionParser.cpp
|
| |
+ +++ b/src/V3OptionParser.cpp
|
| |
+ @@ -114,16 +114,33 @@ V3OPTION_PARSER_DEF_ACT_CB_CLASS(ActionCbCall, void(void), m_cb(), en::NONE);
|
| |
+ V3OPTION_PARSER_DEF_ACT_CB_CLASS(ActionCbFOnOff, void(bool), m_cb(!hasPrefixFNo(optp)),
|
| |
+ en::FONOFF);
|
| |
+ V3OPTION_PARSER_DEF_ACT_CB_CLASS(ActionCbOnOff, void(bool), m_cb(!hasPrefixNo(optp)), en::ONOFF);
|
| |
+ -template <>
|
| |
+ -V3OPTION_PARSER_DEF_ACT_CB_CLASS(ActionCbVal<int>, void(int), m_cb(std::atoi(argp)), en::VALUE);
|
| |
+ -template <>
|
| |
+ -V3OPTION_PARSER_DEF_ACT_CB_CLASS(ActionCbVal<const char*>, void(const char*), m_cb(argp),
|
| |
+ - en::VALUE);
|
| |
+ V3OPTION_PARSER_DEF_ACT_CB_CLASS(ActionCbPartialMatch, void(const char*), m_cb(optp), en::NONE,
|
| |
+ true);
|
| |
+ V3OPTION_PARSER_DEF_ACT_CB_CLASS(ActionCbPartialMatchVal, void(const char*, const char*),
|
| |
+ m_cb(optp, argp), en::VALUE, true);
|
| |
+
|
| |
+ +template <>
|
| |
+ +class V3OptionParser::Impl::ActionCbVal<int> final : public ActionBase<en::VALUE> {
|
| |
+ + std::function<void(int)> m_cb;
|
| |
+ +
|
| |
+ +public:
|
| |
+ + using CbType = std::function<void(int)>;
|
| |
+ + explicit ActionCbVal(CbType cb)
|
| |
+ + : m_cb(std::move(cb)) {}
|
| |
+ + void exec(const char* optp, const char* argp) override { m_cb(std::atoi(argp)); }
|
| |
+ +};
|
| |
+ +
|
| |
+ +template <>
|
| |
+ +class V3OptionParser::Impl::ActionCbVal<const char*> final : public ActionBase<en::VALUE> {
|
| |
+ + std::function<void(const char*)> m_cb;
|
| |
+ +
|
| |
+ +public:
|
| |
+ + using CbType = std::function<void(const char*)>;
|
| |
+ + explicit ActionCbVal(CbType cb)
|
| |
+ + : m_cb(std::move(cb)) {}
|
| |
+ + void exec(const char* optp, const char* argp) override { m_cb(argp); }
|
| |
+ +};
|
| |
+ +
|
| |
+ #undef V3OPTION_PARSER_DEF_ACT_CB_CLASS
|
| |
+
|
| |
+ //######################################################################
|
| |
I noticed the build for 5.020 failed because of an upstream issue, so I put in a fix for it while also bumping to the latest source tarball. In addition, I added CMake (for additional tests), and added a quick hack so that
verilator --version
doesn't print UNKNOWN, though it can be broken into a quick patch.This is the first time I've ever tried committing anything to Fedora, so please let me know if I did anything wrong!