[llvm-commits] [compiler-rt] r151165 - /compiler-rt/trunk/lib/asan/asan_internal.h

Timur Iskhodzhanov timurrrr at google.com
Wed Feb 22 08:25:16 PST 2012


why not
  #ifndef INT32_MIN
  # define INT32_MIN ...
  #endif
instead?


On Wed, Feb 22, 2012 at 8:12 PM, Alexey Samsonov <samsonov at google.com> wrote:
> Author: samsonov
> Date: Wed Feb 22 10:12:46 2012
> New Revision: 151165
>
> URL: http://llvm.org/viewvc/llvm-project?rev=151165&view=rev
> Log:
> AddressSanitizer: quick fix - undef INT32_MIN etc to avoid macro redefinition
>
> Modified:
>    compiler-rt/trunk/lib/asan/asan_internal.h
>
> Modified: compiler-rt/trunk/lib/asan/asan_internal.h
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_internal.h?rev=151165&r1=151164&r2=151165&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/asan/asan_internal.h (original)
> +++ compiler-rt/trunk/lib/asan/asan_internal.h Wed Feb 22 10:12:46 2012
> @@ -68,12 +68,18 @@
>  # define __INT64_C(c)  c ## LL
>  # define __UINT64_C(c) c ## ULL
>  #endif  // __WORDSIZE == 64
> -# define INT32_MIN              (-2147483647-1)
> -# define INT32_MAX              (2147483647)
> -# define UINT32_MAX             (4294967295U)
> -# define INT64_MIN              (-__INT64_C(9223372036854775807)-1)
> -# define INT64_MAX              (__INT64_C(9223372036854775807))
> -# define UINT64_MAX             (__UINT64_C(18446744073709551615))
> +#undef INT32_MIN
> +#define INT32_MIN              (-2147483647-1)
> +#undef INT32_MAX
> +#define INT32_MAX              (2147483647)
> +#undef UINT32_MAX
> +#define UINT32_MAX             (4294967295U)
> +#undef INT64_MIN
> +#define INT64_MIN              (-__INT64_C(9223372036854775807)-1)
> +#undef INT64_MAX
> +#define INT64_MAX              (__INT64_C(9223372036854775807))
> +#undef UINT64_MAX
> +#define UINT64_MAX             (__UINT64_C(18446744073709551615))
>
>  #define ASAN_DEFAULT_FAILURE_EXITCODE 1
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list