diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2018-08-07 17:26:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-07 17:26:58 -0700 |
commit | c831d34205a473cbace8a546704a992ba8220dd6 (patch) | |
tree | 0dae0fabc4b96b2a53665bd0c6c965361538517d /src/include | |
parent | 82515cbaef14918c7ce825e29a30de01c13d90ac (diff) |
Delete functions instead of using CVC4_UNDEFINED (#1794)
C++11 supports explicitly deleting functions that should not be used
(explictly or implictly), e.g. copy or assignment constructors. We were
previously using the CVC4_UNDEFINED macro that used a compiler-specific
attribute. The C++11 feature should be more portable.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/cvc4_public.h | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/include/cvc4_public.h b/src/include/cvc4_public.h index e1d406b03..7950a5af6 100644 --- a/src/include/cvc4_public.h +++ b/src/include/cvc4_public.h @@ -31,28 +31,12 @@ # endif /* __GNUC__ >= 4 */ #endif /* defined _WIN32 || defined __CYGWIN__ */ -// Can use CVC4_UNDEFINED for things like undefined, private -// copy constructors. The advantage is that with CVC4_UNDEFINED, -// if something _does_ try to call the function, you get an error -// at the point of the call (rather than a link error later). - // CVC4_UNUSED is to mark something (e.g. local variable, function) // as being _possibly_ unused, so that the compiler generates no // warning about it. This might be the case for e.g. a variable // only used in DEBUG builds. #ifdef __GNUC__ -# if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 3 ) - /* error function attribute only exists in GCC >= 4.3.0 */ -# define CVC4_UNDEFINED __attribute__((__error__("this function intentionally undefined"))) -# else /* GCC < 4.3.0 */ -# define CVC4_UNDEFINED -# endif /* GCC >= 4.3.0 */ -#else /* ! __GNUC__ */ -# define CVC4_UNDEFINED -#endif /* __GNUC__ */ - -#ifdef __GNUC__ # define CVC4_UNUSED __attribute__((__unused__)) # define CVC4_NORETURN __attribute__ ((__noreturn__)) # define CVC4_CONST_FUNCTION __attribute__ ((__const__)) |