Genivia / ugrep

NEW ugrep 7.1: a more powerful, ultra fast, user-friendly, compatible grep. Includes a TUI, Google-like Boolean search with AND/OR/NOT, fuzzy search, hexdumps, searches (nested) archives (zip, 7z, tar, pax, cpio), compressed files (gz, Z, bz2, lzma, xz, lz4, zstd, brotli), pdfs, docs, and more
https://ugrep.com
BSD 3-Clause "New" or "Revised" License
2.66k stars 111 forks source link

Reflex operator warning on -Woverloaded-virtual= #444

Closed andreasstieger closed 3 days ago

andreasstieger commented 3 days ago

Getting warnings in reflex from -Woverloaded-virtual=. This has been there for some time. Is this the best place or https://github.com/Genivia/RE-flex/?

[   20s] g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I..  -I../include -msse2 -DHAVE_SSE2 -DWITH_NO_INDENT -DWITH_NO_CODEGEN -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I../lzma/C  -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g  -c -o libreflex_a-matcher_avx2.o `test -f 'matcher_avx2.cpp' || echo './'`matcher_avx2.cpp
[   20s] In file included from ../include/reflex/matcher.h:40,
[   20s]                  from matcher_avx2.cpp:43:
[   20s] ../include/reflex/absmatcher.h:1694:27: warning: ‘reflex::PatternMatcher<P>& reflex::PatternMatcher<P>::operator=(const reflex::PatternMatcher<P>&) [with P = reflex::Pattern]’ was hidden [-Woverloaded-virtual=]
[   20s]  1694 |   virtual PatternMatcher& operator=(const PatternMatcher& matcher) ///< matcher with pattern to use (pattern may be shared)
[   20s]       |                           ^~~~~~~~
[   20s] ../include/reflex/matcher.h:111:12: note:   by ‘reflex::Matcher& reflex::Matcher::operator=(const reflex::Matcher&)’
[   20s]   111 |   Matcher& operator=(const Matcher& matcher) ///< matcher to copy
[   20s]       |            ^~~~~~~~
genivia-inc commented 3 days ago

Thank you for your feedback. Will take a look at appeasing this warning. This is a actually not a problem.

genivia-inc commented 3 days ago

Committed a minor source code patch to appease overloading+overriding (hidden) warning for two methods.