Displaying 20 results from an estimated 242 matches for "__gnuc__".
2013 Apr 19
2
Preprocessor error when trying to build integer-only
..., but while trying to do so (by adding #define
FLAC__INTEGER_ONLY_LIBRARY 1 to config.h, just on x86_64-linux) I got
this error
> ./include/private/bitmath.h:134:5: error: operator '&&' has no left
> operand
bitmath.h:134 is the following line
> #if && defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 &&
> __GNUC_MINOR__ >= 4))
I really wonder why anyone would have left it like this. Maybe something
went wrong? Removing the first && solved the problem and it compiled
nicely. This is current git (2de567f), all tests passed...
2006 Jun 20
1
[patch] compiler.h fix use of likely/unlikely
...attems <maks at sternwelten.at>
diff --git a/usr/include/klibc/compiler.h b/usr/include/klibc/compiler.h
index 893f8a9..b7d9b50 100644
--- a/usr/include/klibc/compiler.h
+++ b/usr/include/klibc/compiler.h
@@ -91,12 +91,12 @@ # define __mallocfunc
#endif
/* likely/unlikely */
-#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
-# define __likely(x) __builtin_expect((x), 1)
-# define __unlikely(x) __builtin_expect((x), 0)
+#if defined(__GNUC__)
+# define likely(x) __builtin_expect((x), 1)
+# define unlikely(x) __builtin_expect((x), 0)...
2023 Feb 15
2
[libnbd PATCH v3 02/29] generator/C.ml: use space consistently in func. and func.-like macro calls
..._NONNULL (%s);\n" (String.concat ", " nns)
let rec print_cbarg_list ?(wrap = false) ?maxcol ?types ?(parens = true)
cbargs =
@@ -400,22 +400,22 @@ let
pr "extern \"C\" {\n";
pr "#endif\n";
pr "\n";
- pr "#if defined(__GNUC__)\n";
+ pr "#if defined (__GNUC__)\n";
pr "#define LIBNBD_GCC_VERSION \\\n";
pr " (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)\n";
pr "#endif\n";
pr "\n";
pr "#ifndef LIBNBD_ATTRIBUTE_NONNULL\n";
-...
2015 Sep 14
2
Optimization bug when byte compiling with gcc 5.2.0 on windows
On 14/09/2015 9:36 AM, luke-tierney at uiowa.edu wrote:
> I believe the issue is that on Windows the sqrt function when called
> with a NaN does not return the same NaN, as it does on other platforms.
> We have
>
> #if (defined(_WIN32) || defined(_WIN64)) && defined(__GNUC__) && \
> __GNUC__ <= 4
> # define R_sqrt(x) (ISNAN(x) ? x : sqrt(x))
> #else
> # define R_sqrt sqrt
> #endif
>
> for implementing the SQRT opcode. I suspect this came from Duncan
> Murdoch; I don't know the reason for restricting to __GNUC__ <= 4.
Tha...
2012 Feb 28
0
[LLVMdev] [patch] atomic functions on darwin
...===========================================================
--- lib/Support/Atomic.cpp (revision 151623)
+++ lib/Support/Atomic.cpp (working copy)
@@ -21,17 +21,27 @@
#undef MemoryFence
#endif
+#if defined(__APPLE__)
+#include <libkern/OSAtomic.h>
+// __APPLE__ should take precedence over __GNUC__
+// sys::cas_flag is int32_t from Support/Atomic.h, so use '32' variants
+// prototypes lack the 'volatile' qualifier, so we need to cast them away
+template <class T>
+static inline
+T* vcast(volatile T* ptr) { return const_cast<T*>(ptr); }
+#endif
+
void sys::MemoryFe...
2010 May 13
1
[LLVMdev] libSystem, __clear_cache(), FreeBSD and ARM
...ng hack:
--- lib/System/Memory.cpp
+++ lib/System/Memory.cpp
@@ -61,7 +61,7 @@
for (intptr_t Line = StartLine; Line < EndLine; Line += LineSize)
asm volatile("icbi 0, %0" : : "r"(Line));
asm volatile("isync");
-# elif defined(__arm__) && defined(__GNUC__)
+# elif defined(__arm__) && defined(__GNUC__) && !defined(__FreeBSD__)
// FIXME: Can we safely always call this for __GNUC__ everywhere?
char *Start = (char*) Addr;
char *End = Start + Len;
I don't know anything about ARM, but isn't there a way we can do this
usi...
2015 Sep 14
1
Optimization bug when byte compiling with gcc 5.2.0 on windows
On Mon, Sep 14, 2015 at 8:49 PM, Jeroen Ooms <jeroen.ooms at stat.ucla.edu> wrote:
> I tested this hypothesis by replacing '__GNUC__ <= 4' with '__GNUC__
> <= 5' and rebuilding R, but this introduces a whole lot of problems
> that were not there before. In particular R crashes when using the
> graphics device, which it did not without this fix.
I found that the problem goes away when we use isnanl() i...
2012 May 09
1
[PATCH 2/2] bitmath: Finish up optimizations
...ilog2( 3) = 1
- * ilog2( 4) = 2
- * ilog2( 5) = 2
- * ilog2( 6) = 2
- * ilog2( 7) = 2
- * ilog2( 8) = 3
- * ilog2( 9) = 3
- * ilog2(10) = 3
- * ilog2(11) = 3
- * ilog2(12) = 3
- * ilog2(13) = 3
- * ilog2(14) = 3
- * ilog2(15) = 3
- * ilog2(16) = 4
- * ilog2(17) = 4
- * ilog2(18) = 4
- */
-
-#ifndef __GNUC__
-
-/* For GNUC, use static inline version in include/private/bitmath.h. */
-
-unsigned FLAC__bitmath_ilog2(FLAC__uint32 v)
-{
- unsigned l = 0;
- if (v == 0)
- return 0;
- while(v >>= 1)
- l++;
- return l;
-}
-
-unsigned FLAC__bitmath_ilog2_wide(FLAC__uint64 v)
-{
- unsigned l = 0;
-...
2011 Feb 20
1
[LLVMdev] Why __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__ are defined as 4, 2, 1 in clang?
clang isn't GNU C. So why does it define such values and why they are 4,2,1?
It also defines __GNUC_STDC_INLINE__=1 for some reason.
rev.126022
Yuri
2007 Apr 20
1
[LLVMdev] llvm-gcc make check
...ompiler/llvm-gcc/fixincludes/tests/base/AvailabilityMacros.h
*** AvailabilityMacros.h 2007-04-20 18:38:11.000000000 -0500
---
/users/dag/projects/cascade/compiler/llvm-gcc/fixincludes/tests/base/AvailabilityMacros.h
2007-04-18 16:46:04.000000000 -0500
***************
*** 13,23 ****
#if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 &&
__GNUC_MINOR__ >= 1))
#endif /* DARWIN_GCC4_BREAKAGE_CHECK */
-
-
- #if defined( DARWIN_MACOSX_DEPLOYMENT_TARGET_CHECK )
- __private_extern__ int _dyld_func_lookup(
- const char *dyld_func_name,
- unsigned long *address);
-
- #en...
2019 Jul 12
8
[p2v PATCH 0/5] More small fixes
See individual patches for details.
Pino Toscano (5):
Include signal.h
Remove unused variables
Push -Wsuggest-attribute=noreturn only with GCC
tests: do not set libguestfs environment variables
Define the GCC version macro
Makefile.am | 2 +-
conversion.c | 3 +++
p2v.h | 7 +++++++
ssh.c | 8 +++++---
4 files changed, 16 insertions(+), 4 deletions(-)
--
2.21.0
2008 Mar 20
3
[LLVMdev] Just got bitten by accidentally using the wrong gcc
llvm's ./configure already does that for gcc < 3.
What are valid versions? Exactly 4.0 and 4.2? 4.0 and >=4.2?
dnl Verify that GCC is version 3.0 or higher
if test "$GCC" = "yes"
then
AC_COMPILE_IFELSE([[#if !defined(__GNUC__) || __GNUC__ < 3
#error Unsupported GCC version
#endif
]], [], [AC_MSG_ERROR([gcc 3.x required, but you have a lower
version])])
fi
Shantonu Sen
ssen at apple.com
Sent from my Mac Pro
On Mar 20, 2008, at 3:14 PM, Eric Christopher wrote:
>
> On Mar 20, 2008, at 3:00 PM, Joachim Durch...
2013 Jan 08
1
[PATCH][firmware] efi: Fix build with gnu-efi >= 3.0s
...piled with
+ * it on will result in undefined references to uefi_call_wrapper().
+ *
+ * The reason we don't attempt to check the version of gnu-efi we're
+ * building against is because there's no harm in turning it on for
+ * older versions - it will just be ignored.
+ */
+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
+ #define GNU_EFI_USE_MS_ABI 1
+#endif
+
#include <efi.h>
#include <efilib.h>
#include <efistdarg.h>
diff --git a/efi/vesa.c b/efi/vesa.c
index 473d3a5..38f8213 100644
--- a/efi/vesa.c
+++ b/efi...
2001 Jan 29
1
Mac OS X/Darwin patch for libvorbis
...===========================================
RCS file: /usr/local/cvsroot/vorbis/lib/os.h,v
retrieving revision 1.19
diff -u -p -r1.19 os.h
--- lib/os.h 2000/12/21 21:04:40 1.19
+++ lib/os.h 2001/01/30 01:37:28
@@ -24,19 +24,31 @@
#ifndef _V_IFDEFJAIL_H_
#define _V_IFDEFJAIL_H_
+#ifdef __GNUC__
+#define STIN static inline
+#elif _WIN32
+#define STIN static __inline
+#else
+#define STIN static
+#endif
+
#ifndef M_PI
#define M_PI (3.1415926536f)
#endif
-#ifndef __GNUC__
+
#ifdef _WIN32
# include <malloc.h>
# define rint(x) (floor((x)+0.5f))
+# define NO_FLOAT_MATH_LIB
+#...
2010 Mar 03
1
[LLVMdev] Problem with ALWAYS_INLINE
...: ***
[/arm/scratch/egrimley/llvm-svn-obj/lib/CodeGen/SelectionDAG/Debug/SelectionDAGISel.o] Error 1
I've not investigated any further as I'll probably switch to a newer GCC
quite soon anyway. As a work-around I've changed 4 to 5 in these lines
in include/llvm/Support/Compiler.h:
#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#define ALWAYS_INLINE __attribute__((always_inline))
Perhaps this change should be committed.
--
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended...
2019 Aug 29
0
[PATCH] p2v: Ignore gtk2 deprecated declarations.
...2v/gui.c
index 32c56dda7..a15ea053e 100644
--- a/p2v/gui.c
+++ b/p2v/gui.c
@@ -76,6 +76,7 @@
/* errors in <gtk.h> */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#if defined(__GNUC__) && __GNUC__ >= 6 /* gcc >= 6 */
#pragma GCC diagnostic ignored "-Wshift-overflow"
#endif
diff --git a/p2v/main.c b/p2v/main.c
index 424bccfb3..150037517 100644
--- a/p2v/main.c
+++ b/p2v/main.c
@@ -43,6 +43,7 @@
/* errors in <gtk.h> */
#pragma GCC diagnostic push...
2013 May 15
2
FLAC currently won't compile for Android [bisected]
Hi,
I couldn't figure out how to file a bug in the bugtracker at sourceforge.
So I send a report this way.
Building FLAC from git for Android fails with the following message:
utils.c: In function 'get_console_width':
utils.c:181:17: error: storage size of 'w' isn't known
utils.c:181:17: warning: unused variable 'w' [-Wunused-variable]
make[3]: *** [utils.o]
2000 Jun 26
1
Re: [vorbis] bug in glibc 2.1.2 and older
Hello,
I have solved this problem in the splay mp3 decoder with this:
In the header:
#if (__GNUC__ < 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ < 91 ) )
#warning "inline code disabled! (buggy egcs version)"
#undef __NO_MATH_INLINES
#define __NO_MATH_INLINES 1
#endif
#include <math.h>
In the makefile:
CXXFLAGS=@CXXFLAGS@ -fno-strength-reduce
(Opt level is 2)
and in...
2015 Sep 14
3
Optimization bug when byte compiling with gcc 5.2.0 on windows
When building R-devel with gcc 5.2.0 (mingw-w64 v4) on Windows, make
check fails reg-tests-1b.R at the following check:
x <- c(1:2, NA)
sx <- sd(x)
!is.nan(sx)
Here 'sx' should be 'NA' but it is 'NaN'. It turns out this problem
only appears when the function is byte compiled with optimization
level 3:
mysd <- function (x, na.rm = FALSE)
sqrt(var(if
2017 Feb 15
3
about "cpu.h: Fix compiler detection" patch
After this patch, all FLAC__SSEN_SUPPORTED variables are
undefined for GCC, so intrinsic versions of functions are
not compiled into libFLAC.
Previously, the code was:
#if defined __INTEL_COMPILER
// definitions for ICC
#elif defined _MSC_VER
// definitions for MSVC
#elif defined __GNUC__ || defined __clang__
#if defined __clang__ && __has_attribute(__target__)
// definitions for newer clang
#elif !defined __clang__ && (__GNUC__ > 4 || (__GNUC__ == 4 &&
__GNUC_MINOR__ >= 9))
// definitions for newer GCC
#else
// definitions for...