Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress warning in parser_compile when enabling Universal Parser #10734

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

S-H-GAMELINKS
Copy link
Contributor

@S-H-GAMELINKS S-H-GAMELINKS commented May 7, 2024

These warning is output when enabled Universal Parser.
This pull request was supress these warning.

compiling ../ruby/ruby_parser.c
../ruby/ruby_parser.c: In function ‘parser_compile’:
../ruby/ruby_parser.c:677:48: warning: passing argument 5 of ‘rb_parser_compile’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifier]
  677 |     ast = rb_parser_compile(p, gets, ptr, len, enc, input, line);
      |                                                ^~~
In file included from ../ruby/ruby_parser.c:3:
../ruby/internal/parse.h:58:128: note: expected ‘void *’ but argument is of type ‘const rb_encoding *’ {aka ‘const struct OnigEncodingTypeST *’}
   58 | rb_ast_t *rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, const char *fname_ptr, long fname_len, rb_encoding *fname_enc, rb_parser_input_data input, int line);
      |                                                                                                                                ^
../ruby/ruby_parser.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant