Commit b25f8326 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cfortran.h: define GNUC_PUSH_POP

parent 3780e0c6
...@@ -474,7 +474,13 @@ for (i=0; i<sizeofcstr/elem_len; i++) { ...@@ -474,7 +474,13 @@ for (i=0; i<sizeofcstr/elem_len; i++) {
} return cstr; } } return cstr; }
/* kill the trailing char t's in string s. */ /* kill the trailing char t's in string s. */
#if defined (__GNUC__) #if !defined(GNUC_PUSH_POP) && defined(__GNUC__) && !defined(__ICC) && !defined(__clang__)
#if (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 4)
#define GNUC_PUSH_POP
#endif
#endif
#if defined(GNUC_PUSH_POP)
#pragma GCC push_options #pragma GCC push_options
#pragma GCC optimize ("O2") #pragma GCC optimize ("O2")
#endif #endif
...@@ -489,7 +495,7 @@ if (e>s) { /* Need this to handle NULL string.*/ ...@@ -489,7 +495,7 @@ if (e>s) { /* Need this to handle NULL string.*/
while (e>s && *--e==t); /* Don't follow t's past beginning. */ while (e>s && *--e==t); /* Don't follow t's past beginning. */
e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */ e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */
} return s; } } return s; }
#if defined (__GNUC__) #if defined(GNUC_PUSH_POP)
#pragma GCC pop_options #pragma GCC pop_options
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment