Message ID | 2C125A4A-EBA5-4F14-A1A7-9A5A5A8AAEBA@adacore.com |
---|---|
State | New |
Headers | show |
Series | undefine OFFSET in testsuite/gcc.dg/vect/tree-vect.h | expand |
On Dec 20, 2019, at 10:11 AM, Olivier Hainque <hainque@adacore.com> wrote: > > The attached patch is a proposal for a basic solution > to an issue which might be an improper thing done by a > system header on VxWorks, but which is a big pain to fix > at this level and very simple to address super locally. > Is this OK to commit ? Ok, but I will comment it would be much better to fix includes the header to be namespace clean, longer run. I know why that probably won't work, but I'll mention it anyway. If fixincluding the header works better than I expect, please do that fix instead.
> On 21 Dec 2019, at 02:39, Mike Stump <mikestump@comcast.net> wrote: > > On Dec 20, 2019, at 10:11 AM, Olivier Hainque <hainque@adacore.com> wrote: >> >> The attached patch is a proposal for a basic solution >> to an issue which might be an improper thing done by a >> system header on VxWorks, but which is a big pain to fix >> at this level and very simple to address super locally. > >> Is this OK to commit ? > > Ok, but I will comment it would be much better to fix includes the header to be namespace clean, longer run. I know why that probably won't work, but I'll mention it anyway. If fixincluding the header works better than I expect, please do that fix instead. Thanks for your reviews and feedback Mike. Always glad to receive experts' comments :) Yes, fixincludes is something we have considered and will reconsider at some point. We have made progress for Vx6 but we're still not ready for Vx7, where custom OS install are made for every project (notion of VSB), so there are compromises to make on which we're still not clear how to settle. Besides, this particular fix would be pretty invasive as the problematic definition is exposed by a common header (vxWorksCommon.h) for use by potentially any other system header. Olivier
diff --git a/gcc/testsuite/gcc.dg/vect/tree-vect.h b/gcc/testsuite/gcc.dg/vect/tree-vect.h index 69c93ac8092..5d8d9eba3f8 100644 --- a/gcc/testsuite/gcc.dg/vect/tree-vect.h +++ b/gcc/testsuite/gcc.dg/vect/tree-vect.h @@ -85,3 +85,9 @@ check_vect (void) #else # define VECTOR_BITS 128 #endif + +/* Which most of our tests are going to #define for internal use, and + which might be exposed by system headers related to signal.h on some + targets, notably VxWorks. */ +#undef OFFSET +