mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-03 17:48:56 +01:00 
			
		
		
		
	Add G_GNUC_BEGIN/END_IGNORE_DEPRECATIONS
Add new macros to disable -Wdeprecated-declarations around a piece of code, using the C99 (and GNU89) _Pragma() operator. Replace the existing use of #pragma for this in gio, and suppress the warnings in gvaluearray.c as well. https://bugzilla.gnome.org/show_bug.cgi?id=669671
This commit is contained in:
		@@ -114,6 +114,17 @@
 | 
			
		||||
#define G_GNUC_DEPRECATED_FOR(f)        G_GNUC_DEPRECATED
 | 
			
		||||
#endif /* __GNUC__ */
 | 
			
		||||
 | 
			
		||||
#if    __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
 | 
			
		||||
#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS		\
 | 
			
		||||
  _Pragma ("GCC diagnostic push")			\
 | 
			
		||||
  _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
 | 
			
		||||
#define G_GNUC_END_IGNORE_DEPRECATIONS			\
 | 
			
		||||
  _Pragma ("GCC diagnostic pop")
 | 
			
		||||
#else
 | 
			
		||||
#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 | 
			
		||||
#define G_GNUC_END_IGNORE_DEPRECATIONS
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if     __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
 | 
			
		||||
#  define G_GNUC_MAY_ALIAS __attribute__((may_alias))
 | 
			
		||||
#else
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user