Issue #15284 has been updated by usa (Usaku NAKAMURA).

Backport changed from 2.3: REQUIRED, 2.4: REQUIRED, 2.5: DONE to 2.3: REQUIRED, 2.4: DONE, 2.5: DONE

ruby_2_4 r66970 merged revision(s) 65667.

----------------------------------------
Bug #15284: Unintentional warnings with node.h
https://bugs.ruby-lang.org/issues/15284#change-76615

* Author: hsbt (Hiroshi SHIBATA)
* Status: Closed
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* Target version: 
* ruby -v: 
* Backport: 2.3: REQUIRED, 2.4: DONE, 2.5: DONE
----------------------------------------
Recently, I got the following warnings with build time.

```
parse.c:4720:14: warning: incompatible pointer types passing 'FILE *' (aka 'struct __sFILE *') to parameter of type 'struct parser_params *' [-Wincompatible-pointer-types]
  YYFPRINTF (yyo, "%s %s (",
             ^~~
../node.h:437:57: note: passing argument to parameter 'parser' here
PRINTF_ARGS(void rb_parser_printf(struct parser_params *parser, const char *fmt, ...), 2, 3);
                                                        ^
parse.c:4724:14: warning: incompatible pointer types passing 'FILE *' (aka 'struct __sFILE *') to parameter of type 'struct parser_params *' [-Wincompatible-pointer-types]
  YYFPRINTF (yyo, ": ");
             ^~~
../node.h:437:57: note: passing argument to parameter 'parser' here
PRINTF_ARGS(void rb_parser_printf(struct parser_params *parser, const char *fmt, ...), 2, 3);
                                                        ^
parse.c:4726:14: warning: incompatible pointer types passing 'FILE *' (aka 'struct __sFILE *') to parameter of type 'struct parser_params *' [-Wincompatible-pointer-types]
  YYFPRINTF (yyo, ")");
             ^~~
../node.h:437:57: note: passing argument to parameter 'parser' here
PRINTF_ARGS(void rb_parser_printf(struct parser_params *parser, const char *fmt, ...), 2, 3);
```

Maybe, It caused by bison version.

```
> bison --version
bison (GNU Bison) 3.2
```





-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>