On Thu, Jul 21, 2016 at 10:37 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Thu, Jul 21, 2016 at 9:00 AM, Uros Bizjak <ubiz...@gmail.com> wrote: >> Hello! >> >>> > gcc/ChangeLog: >>> > PR c/70339 >>> > * diagnostic-show-locus.c (diagnostic_show_locus): If this is >>> > the >>> > same location as last time, don't skip if we have fix-it hints. >>> > Clarify the skipping logic by converting it from one "if" >>> > clause >>> > to repeated "if" clauses. >>> > * spellcheck-tree.c: Include "cpplib.h". >>> > (find_closest_macro_cpp_cb): Move here from c/c-decl.c. >>> > (best_macro_match::best_macro_match): New constructor. >>> > * spellcheck-tree.h (struct edit_distance_traits<cpp_hashnode >>> > *>): >>> > Move here from c/c-decl.c. >>> > (class best_macro_match): Move here from c/c-decl.c, converting >>> > from a typedef to a subclass, gaining a ctor. >> >> This part introduced bootstrap failure on CentOS 5.11: >> >> g++ -std=gnu++98 -fno-PIE -c -g -DIN_GCC -fno-strict-aliasing >> -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall >> -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute >> -Woverloaded-virtual -fno-common -DHAVE_CONFIG_H -I. -I. >> -I../../git/gcc/gcc -I../../git/gcc/gcc/. >> -I../../git/gcc/gcc/../include -I../../git/gcc/gcc/../libcpp/include >> -I/usr/local/include -I/usr/local/include -I/usr/local/include >> -I../../git/gcc/gcc/../libdecnumber >> -I../../git/gcc/gcc/../libdecnumber/bid -I../libdecnumber >> -I../../git/gcc/gcc/../libbacktrace -o spellcheck-tree.o -MT >> spellcheck-tree.o -MMD -MP -MF ./.deps/spellcheck-tree.TPo >> ../../git/gcc/gcc/spellcheck-tree.c >> ../../git/gcc/gcc/spellcheck-tree.c: In constructor >> ‘best_macro_match::best_macro_match(tree_node*, edit_distance_t, >> cpp_reader*)’: >> ../../git/gcc/gcc/spellcheck-tree.c:94: error: class >> ‘best_macro_match’ does not have any field named ‘best_match’ >> ../../git/gcc/gcc/spellcheck-tree.c:94: error: no matching function >> for call to ‘best_match<tree_node*, cpp_hashnode*>::best_match()’ >> ../../git/gcc/gcc/spellcheck.h:91: note: candidates are: >> best_match<GOAL_TYPE, CANDIDATE_TYPE>::best_match(GOAL_TYPE, >> edit_distance_t) [with GOAL_TYPE = tree_node*, CANDIDATE_TYPE = >> cpp_hashnode*] >> ../../git/gcc/gcc/spellcheck.h:81: note: >> best_match<tree_node*, cpp_hashnode*>::best_match(const >> best_match<tree_node*, cpp_hashnode*>&) >> gmake: *** [spellcheck-tree.o] Error 1 >> >> CentOS 5 has pretty old system compiler [gcc version 4.1.2 20080704 >> (Red Hat 4.1.2-55)], but the build worked until the above patch was >> committed. Is it possible to work around this failure somehow? > > Similar failure with SLE11 host compiler (gcc 4.3.4): > > g++ -std=gnu++98 -fno-PIE -c -g -DIN_GCC -fno-exceptions > -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings > -Wcast-qual -Wno-format -Wmissing-format-attribute > -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros > -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -I. > -I/space/rguenther/src/svn/trunk/gcc > -I/space/rguenther/src/svn/trunk/gcc/. > -I/space/rguenther/src/svn/trunk/gcc/../include > -I/space/rguenther/src/svn/trunk/gcc/../libcpp/include > -I/space/rguenther/src/svn/trunk/gcc/../libdecnumber > -I/space/rguenther/src/svn/trunk/gcc/../libdecnumber/bid > -I../libdecnumber -I/space/rguenther/src/svn/trunk/gcc/../libbacktrace > -o spellcheck-tree.o -MT spellcheck-tree.o -MMD -MP -MF > ./.deps/spellcheck-tree.TPo > /space/rguenther/src/svn/trunk/gcc/spellcheck-tree.c > /space/rguenther/src/svn/trunk/gcc/spellcheck-tree.c: In constructor > ‘best_macro_match::best_macro_match(tree_node*, edit_distance_t, > cpp_reader*)’: > /space/rguenther/src/svn/trunk/gcc/spellcheck-tree.c:94: error: class > ‘best_macro_match’ does not have any field named ‘best_match’ > /space/rguenther/src/svn/trunk/gcc/spellcheck-tree.c:94: error: no > matching function for call to ‘best_match<tree_node*, > cpp_hashnode*>::best_match()’ > /space/rguenther/src/svn/trunk/gcc/spellcheck.h:91: note: candidates > are: best_match<GOAL_TYPE, CANDIDATE_TYPE>::best_match(GOAL_TYPE, > edit_distance_t) [with GOAL_TYPE = tree_node*, CANDIDATE_TYPE = > cpp_hashnode*] > /space/rguenther/src/svn/trunk/gcc/spellcheck.h:81: note: > best_match<tree_node*, cpp_hashnode*>::best_match(const > best_match<tree_node*, cpp_hashnode*>&) > make[3]: *** [spellcheck-tree.o] Error 1 > > works with GCC 4.5 (didn't check 4.4 yet).
Not sure where it should pick up best_macro_match : best_match <tree, edit_distance_t>, the only best_macro_match I find is class best_macro_match : public best_match<tree, cpp_hashnode *> shouldn't best_macro_match::best_macro_match (tree goal, edit_distance_t best_distance_so_far, cpp_reader *reader) : best_match (goal, best_distance_so_far) { cpp_forall_identifiers (reader, find_closest_macro_cpp_cb, this); } be using best_match (goal, reader) here? Richard. > Richard. > >> Uros.