Hello,

The m4 dev line ( git://git.savannah.gnu.org/m4.git )
has the following code:
```
#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wformat-nonliteral"
#endif
```

This produces an error on the clang compiler I am using on z/OS, which is
at 4.2 with the xasprintf code that follows, e.g.

```
str = xasprintf (fstart, width, ARG_INT(argc, argv));
```

If I change the check to:

```
#if 4 < __GNUC__ + (2 <= __GNUC_MINOR__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wformat-nonliteral"
#endif
```

all is good - it compiles clean. The question is whether the check for 6 is
too high or if the clang compiler on z/OS has a bug (or something else)?

I haven't been able to determine what level of gcc provides this diagnostic.

thanks, mike

Reply via email to