On Fri, Jul 1, 2011 at 6:37 AM, Rainer Orth <r...@cebitec.uni-bielefeld.de> wrote: > "H.J. Lu" <hjl.to...@gmail.com> writes: > >> On Fri, Jul 1, 2011 at 2:02 AM, Rainer Orth <r...@cebitec.uni-bielefeld.de> >> wrote: >>> "H.J. Lu" <hjl.to...@gmail.com> writes: >>> >>>> Here is the updated patch. It works on simple tests. >>>> I am running full tests. I kept config/i386/value-unwind.h >>>> since libgcc/md-unwind-support.h is included too late >>>> in unwind-dw2.c and I don't want to move it to be on >>>> the safe side. >>> >>> Oh please, don't pile hack upon hack to avoid proper testing. >>> >> >> What is your suggestion? > > How about moving the md-unwind-support.h include up to the rest of the > includes? The headers usually only define MD_FALLBACK_FRAME_STATE_FOR > and perhaps MD_FROB_UPDATE_CONTEXT, everything else is an internal > helper macro, so order shouldn't matter. >
It doesn't work on Linux/x86-64: In file included from /export/gnu/import/git/gcc/libgcc/../gcc/unwind-dw2.c:39:0: ./md-unwind-support.h: In function \u2018x86_fallback_frame_state\u2019: ./md-unwind-support.h:121:30: error: dereferencing pointer to incomplete type ./md-unwind-support.h:129:17: error: dereferencing pointer to incomplete type ./md-unwind-support.h:141:23: error: dereferencing pointer to incomplete type ./md-unwind-support.h:153:49: error: dereferencing pointer to incomplete type ./md-unwind-support.h: In function \u2018x86_frob_update_context\u2019: ./md-unwind-support.h:185:30: error: dereferencing pointer to incomplete type ./md-unwind-support.h:192:5: warning: implicit declaration of function \u2018_Unwind_SetSignalFrame\u2019 [-Wimplicit-function-declaration] /export/gnu/import/git/gcc/libgcc/../gcc/unwind-dw2.c: At top level: /export/gnu/import/git/gcc/libgcc/../gcc/unwind-dw2.c:140:1: warning: conflicting types for \u2018_Unwind_SetSignalFrame\u2019 [enabled by default] /export/gnu/import/git/gcc/libgcc/../gcc/unwind-dw2.c:140:1: error: static declaration of \u2018_Unwind_SetSignalFrame\u2019 follows non-static declaration ./md-unwind-support.h:192:5: note: previous implicit declaration of \u2018_Unwind_SetSignalFrame\u2019 was here -- H.J.