git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Randall S. Becker" <rsbecker@nexbridge.com>
To: "'Ramsay Jones'" <ramsay@ramsayjones.plus.com>,
	"'Jeff King'" <peff@peff.net>
Cc: <git@vger.kernel.org>
Subject: RE: [PATCH v2 1/6] Bypass GCC attributes on NonStop platform where used.
Date: Fri, 19 Jan 2018 17:53:04 -0500	[thread overview]
Message-ID: <001201d39178$472d71e0$d58855a0$@nexbridge.com> (raw)
In-Reply-To: <f2fd4d75-259b-a5b0-a7f9-74fec79cc970@ramsayjones.plus.com>

On January 19, 2018 5:43 PM, Ramsay Jones wrote:
> On 19/01/18 21:20, Jeff King wrote:
> > On Fri, Jan 19, 2018 at 08:28:48PM +0000, Ramsay Jones wrote:
> >
> >>> diff --git a/remote.c b/remote.c
> >>> index 4e93753e1..c18f9de7f 100644
> >>> --- a/remote.c
> >>> +++ b/remote.c
> >>> @@ -11,6 +11,10 @@
> >>>  #include "mergesort.h"
> >>>  #include "argv-array.h"
> >>>
> >>> +#if defined (__TANDEM)
> >>> +#define __attribute(a)
> >>> +#endif
> >>> +
> >>
> >> Hmm, the only use of __attribute() I can find is in compat/regex/.
> >> In particular, there is no use of __attribute() in regex.c.
> >> [__attribute__() is used in regex.c]
> >>
> >> Is this an old patch which is no longer required?
> >>
> >> puzzled.
> 
> heh, I only just noticed that I (twice) wrote regex.c when I meant remote.c
> instead. Hopefully, that didn't cause too much confusion!
> 
> > I'm puzzled, too. The actual gcc thing is __attribute__(), and we
> > already turn that into a noop via macro expansion if __GNUC__ is not
> > defined (in git-compat-util.h, but see below).
> >
> > __attribute(), without the trailing underscores, is used internally by
> > the regex compat code (but it also converts that into a noop on
> > non-GNUC platforms)>
> 
> Indeed.
> 
> > However the logic in git-compat-util is weird:
> >
> >   #if defined(__HP_cc) && (__HP_cc >= 61000)
> >   #define NORETURN __attribute__((noreturn))
> >   #define NORETURN_PTR
> >   #elif defined(__GNUC__) && !defined(NO_NORETURN)
> >   #define NORETURN __attribute__((__noreturn__))
> >   #define NORETURN_PTR __attribute__((__noreturn__))
> >   #elif defined(_MSC_VER)
> >   #define NORETURN __declspec(noreturn)
> >   #define NORETURN_PTR
> >   #else
> >   #define NORETURN
> >   #define NORETURN_PTR
> >   #ifndef __GNUC__
> >   #ifndef __attribute__
> >   #define __attribute__(x)
> >   #endif
> >   #endif
> >   #endif
> >
> > Most of the conditional is dealing with NORETURN, but then we stick
> > the __attribute()__ handling in the "else" block. Is it possible that
> > this platform triggers __HP_cc, but doesn't actually understand
> > __attribute__?
> 
> That seems unlikely. However, that conditional looks a mess ... ;-)

Very messy and confusing and it is working properly now, so... consider this patch gone ;-)

Cheers,
Randall


  reply	other threads:[~2018-01-19 22:53 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19 17:33 [PATCH v2 0/6] Force pipes to flush immediately on NonStop platform randall.s.becker
2018-01-19 17:34 ` [PATCH v2 0/6] Cover Letter for NonStop Port Patches randall.s.becker
2018-01-19 17:34 ` [PATCH v2 1/6] Bypass GCC attributes on NonStop platform where used randall.s.becker
2018-01-19 19:25   ` Stefan Beller
2018-01-19 20:28   ` Ramsay Jones
2018-01-19 21:20     ` Jeff King
2018-01-19 22:43       ` Ramsay Jones
2018-01-19 22:53         ` Randall S. Becker [this message]
2018-01-19 17:34 ` [PATCH v2 2/6] Add tar extract install options override in installation processing randall.s.becker
2018-01-20 12:30   ` René Scharfe
2018-01-20 13:44     ` Randall S. Becker
2018-01-20 14:24       ` René Scharfe
2018-01-20 15:35         ` Randall S. Becker
2018-01-20 20:34           ` Ævar Arnfjörð Bjarmason
2018-01-20 20:52             ` Randall S. Becker
2018-01-19 17:34 ` [PATCH v2 3/6] Define config options required for the HPE NonStop NSX and NSE platforms randall.s.becker
2018-01-19 17:34 ` [PATCH v2 4/6] Force test suite traps to be cleared for NonStop ksh randall.s.becker
2018-01-19 19:55   ` Stefan Beller
2018-01-19 21:27   ` Jeff King
2018-01-19 22:29     ` Randall S. Becker
2018-01-19 23:29       ` Randall S. Becker
2018-01-21  4:07       ` Randall S. Becker
2018-01-19 17:34 ` [PATCH v2 5/6] Bring NonStop platform definitions up to date in git-compat-util.h randall.s.becker
2018-01-19 17:34 ` [PATCH v2 6/6] Add intptr_t and uintptr_t to regcomp.c for NonStop platform randall.s.becker
2018-01-19 19:34 ` [PATCH v2 0/6] Force pipes to flush immediately on " Stefan Beller
2018-01-20 11:10 ` Torsten Bögershausen
2018-01-20 13:23   ` Randall S. Becker
2018-01-22 22:36   ` Junio C Hamano
2018-01-22 22:43     ` Randall S. Becker
2018-01-23 18:13       ` Junio C Hamano
2018-01-23 20:46         ` Randall S. Becker
2018-01-25  3:42         ` Randall S. Becker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001201d39178$472d71e0$d58855a0$@nexbridge.com' \
    --to=rsbecker@nexbridge.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=ramsay@ramsayjones.plus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).