Advertisement
Guest User

gcc_compat.h

a guest
Feb 12th, 2017
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.03 KB | None | 0 0
  1. /*
  2.     This file is a part of VisualGDB [http://visualgdb.com/].
  3.     It prevents IntelliSense errors related to GCC-specific constructs by hiding them via empty preprocessor definitions.
  4.     NEVER INCLUDE THIS FILE IN YOUR ACTUAL SOURCE CODE.
  5. */
  6.  
  7. #ifdef _MSC_VER
  8.  
  9. typedef char *__builtin_va_list, *__gnuc_va_list;
  10.  
  11. #define asm(...)
  12. #define __asm__(...)
  13. #define __asm
  14. #define __asm(...)
  15. #define __nonnull(...)
  16. #define __attribute__(...)
  17. #define __extension__
  18. #define __inline__ inline
  19. #define __signed__ signed
  20. #define __restrict__
  21. #define __gthrw(...)
  22.  
  23. #define __const const
  24. #define __volatile volatile
  25. #define __THROW
  26.  
  27. #define __cdecl
  28.  
  29. #define __typeof decltype
  30. #define __builtin_va_start(...)
  31. #define __builtin_va_end(...)
  32. #define __builtin_vsnprintf(...)
  33. #define __null 0
  34.  
  35. #define __builtin_va_arg(_v, _t) *(_t *)(void *)_v
  36. #define __builtin_bswap32(_t) (uint32_t)_t;
  37.  
  38. #if !defined(__cplusplus) && _MSC_VER >= 1900
  39. #define inline __inline
  40. #endif
  41.  
  42. #if defined(__cplusplus) && !defined(namespace)
  43. namespace std
  44. {
  45.     typedef int nullptr_t;
  46. }
  47. #endif
  48.  
  49. #define _UPPER          0x1     // Upper case letter
  50. #define _LOWER          0x2     // Lower case letter
  51. #define _DIGIT          0x4     // Digit[0-9]
  52. #define _SPACE          0x8     // Tab, carriage return, newline, vertical tab or form feed
  53. #define _PUNCT          0x10    // Punctuation character
  54. #define _CONTROL        0x20    // Control character
  55. #define _BLANK          0x40    // Space char
  56. #define _HEX            0x80    // Hexadecimal digit
  57.  
  58. /* If you encounter IntelliSense errors caused by GCC-specific keywords, add them to this file similar to the lines above.*/
  59.  
  60. #elif defined(__SYSPROGS_CODESENSE__)
  61.  
  62. #pragma clang diagnostic push
  63. #pragma clang diagnostic ignored "-Wreserved-id-macro"
  64. #pragma clang diagnostic ignored "-Wunused-macros"
  65. #pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
  66.  
  67. #define __null 0
  68.  
  69. #if defined(__x86_64__) || defined (_x86_) || defined(_X86_)
  70. #include "builtins_ia32.h"
  71. #endif
  72.  
  73. #pragma clang diagnostic pop
  74.  
  75. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement