public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Remove non-ANSI C path in ansidecl.h.
@ 2022-05-05 12:18 Martin Liška
  2022-05-05 12:27 ` Richard Biener
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Liška @ 2022-05-05 12:18 UTC (permalink / raw)
  To: gcc-patches

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

include/ChangeLog:

	* ansidecl.h (PTR): Remove Not ANCI C part.
---
 include/ansidecl.h | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/include/ansidecl.h b/include/ansidecl.h
index 4275c9b9cbd..f42c6afc7e9 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -89,21 +89,7 @@ So instead we use the macro below and test it against specific values.  */
 # endif
 #endif
 
-#else	/* Not ANSI C.  */
-
-#define PTR		char *
-
-/* some systems define these in header files for non-ansi mode */
-#undef const
-#undef volatile
-#undef signed
-#undef inline
-#define const
-#define volatile
-#define signed
-#define inline
-
-#endif	/* ANSI C.  */
+#endif
 
 /* Define macros for some gcc attributes.  This permits us to use the
    macros freely, and know that they will come into play for the
-- 
2.36.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove non-ANSI C path in ansidecl.h.
  2022-05-05 12:18 [PATCH] Remove non-ANSI C path in ansidecl.h Martin Liška
@ 2022-05-05 12:27 ` Richard Biener
  2022-05-06  1:30   ` Eric Gallager
  2022-05-09 11:47   ` Martin Liška
  0 siblings, 2 replies; 4+ messages in thread
From: Richard Biener @ 2022-05-05 12:27 UTC (permalink / raw)
  To: Martin Liška; +Cc: GCC Patches

On Thu, May 5, 2022 at 2:19 PM Martin Liška <mliska@suse.cz> wrote:
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> Ready to be installed?
> Thanks,
> Martin
>
> include/ChangeLog:
>
>         * ansidecl.h (PTR): Remove Not ANCI C part.
> ---
>  include/ansidecl.h | 16 +---------------
>  1 file changed, 1 insertion(+), 15 deletions(-)
>
> diff --git a/include/ansidecl.h b/include/ansidecl.h
> index 4275c9b9cbd..f42c6afc7e9 100644
> --- a/include/ansidecl.h
> +++ b/include/ansidecl.h
> @@ -89,21 +89,7 @@ So instead we use the macro below and test it against specific values.  */
>  # endif
>  #endif
>
> -#else  /* Not ANSI C.  */
> -
> -#define PTR            char *
> -
> -/* some systems define these in header files for non-ansi mode */
> -#undef const
> -#undef volatile
> -#undef signed
> -#undef inline
> -#define const
> -#define volatile
> -#define signed
> -#define inline
> -
> -#endif /* ANSI C.  */

You'd have to ask the sourceware side as well (binutils), but for sure
either the
guarding #if should be removed or the #else path should contain an #error.

Richard.

> +#endif
>
>  /* Define macros for some gcc attributes.  This permits us to use the
>     macros freely, and know that they will come into play for the
> --
> 2.36.0
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove non-ANSI C path in ansidecl.h.
  2022-05-05 12:27 ` Richard Biener
@ 2022-05-06  1:30   ` Eric Gallager
  2022-05-09 11:47   ` Martin Liška
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Gallager @ 2022-05-06  1:30 UTC (permalink / raw)
  To: Richard Biener; +Cc: Martin Liška, GCC Patches

On Thu, May 5, 2022 at 8:27 AM Richard Biener via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> On Thu, May 5, 2022 at 2:19 PM Martin Liška <mliska@suse.cz> wrote:
> >
> > Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> >
> > Ready to be installed?
> > Thanks,
> > Martin
> >
> > include/ChangeLog:
> >
> >         * ansidecl.h (PTR): Remove Not ANCI C part.
> > ---
> >  include/ansidecl.h | 16 +---------------
> >  1 file changed, 1 insertion(+), 15 deletions(-)
> >
> > diff --git a/include/ansidecl.h b/include/ansidecl.h
> > index 4275c9b9cbd..f42c6afc7e9 100644
> > --- a/include/ansidecl.h
> > +++ b/include/ansidecl.h
> > @@ -89,21 +89,7 @@ So instead we use the macro below and test it against specific values.  */
> >  # endif
> >  #endif
> >
> > -#else  /* Not ANSI C.  */
> > -
> > -#define PTR            char *
> > -
> > -/* some systems define these in header files for non-ansi mode */
> > -#undef const
> > -#undef volatile
> > -#undef signed
> > -#undef inline
> > -#define const
> > -#define volatile
> > -#define signed
> > -#define inline
> > -
> > -#endif /* ANSI C.  */
>
> You'd have to ask the sourceware side as well (binutils), but for sure
> either the
> guarding #if should be removed or the #else path should contain an #error.

Maybe just make it a #warning for one release, and then if no one
complains, turn it into an #error in the following release?

>
> Richard.
>
> > +#endif
> >
> >  /* Define macros for some gcc attributes.  This permits us to use the
> >     macros freely, and know that they will come into play for the
> > --
> > 2.36.0
> >

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove non-ANSI C path in ansidecl.h.
  2022-05-05 12:27 ` Richard Biener
  2022-05-06  1:30   ` Eric Gallager
@ 2022-05-09 11:47   ` Martin Liška
  1 sibling, 0 replies; 4+ messages in thread
From: Martin Liška @ 2022-05-09 11:47 UTC (permalink / raw)
  To: Richard Biener; +Cc: GCC Patches

On 5/5/22 14:27, Richard Biener wrote:
> You'd have to ask the sourceware side as well (binutils), but for sure
> either the

Yes, I've asked and they proved that.

> guarding #if should be removed or the #else path should contain an #error.

All right, I'm going to install the version w/o #if.

Martin

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-09 11:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05 12:18 [PATCH] Remove non-ANSI C path in ansidecl.h Martin Liška
2022-05-05 12:27 ` Richard Biener
2022-05-06  1:30   ` Eric Gallager
2022-05-09 11:47   ` Martin Liška

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 read-only IMAP folder(s) and NNTP newsgroup(s).