groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 01/14: [libgroff]: Quieten Clang 13 warning.


From: G. Branden Robinson
Subject: [groff] 01/14: [libgroff]: Quieten Clang 13 warning.
Date: Mon, 1 Nov 2021 09:19:36 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 6990fdf589933244934a7d54320477b207dec0ae
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Oct 31 11:07:43 2021 +1100

    [libgroff]: Quieten Clang 13 warning.
    
    * src/libs/libgroff/new.cpp (delete): Declare `throw()` (no exceptions
      thrown); quiets "-Wimplicit-exception-spec-mismatch" from Clang 13.
    
    Seen on Mac OS X.
    
    Also add editor aid comments.
---
 ChangeLog                 | 6 ++++++
 src/libs/libgroff/new.cpp | 8 +++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index b74254b..99f3e2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2021-10-31  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       * src/libs/libgroff/new.cpp (delete): Declare `throw()` (no
+       exceptions thrown); quiets "-Wimplicit-exception-spec-mismatch"
+       from Clang 13.
+
+2021-10-31  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        * m4/groff.m4: Fix messaging nits.
        (GROFF_MAKEINFO): Set `missing` to "missing 'makeinfo'" for
        consistency with other assignments to `missing`.
diff --git a/src/libs/libgroff/new.cpp b/src/libs/libgroff/new.cpp
index 4c6d1b8..2af976c 100644
--- a/src/libs/libgroff/new.cpp
+++ b/src/libs/libgroff/new.cpp
@@ -48,7 +48,7 @@ void *operator new(size_t size)
   return p;
 }
 
-void operator delete(void *p)
+void operator delete(void *p) throw()
 {
   if (p)
     free(p);
@@ -67,3 +67,9 @@ void operator delete(void *p,
   if (p)
     free(p);
 }
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]