This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3/8] add default for PCC_BITFIELD_TYPE_MATTERS
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Trevor Saunders <tbsaunde at tbsaunde dot org>
- Cc: Andreas Schwab <schwab at linux-m68k dot org>, Jeff Law <law at redhat dot com>, tbsaunde+gcc at tbsaunde dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 30 Apr 2015 14:13:33 +0200
- Subject: Re: [PATCH 3/8] add default for PCC_BITFIELD_TYPE_MATTERS
- Authentication-results: sourceware.org; auth=none
- References: <87oam7nmck dot fsf at igel dot home> <20150429212811 dot GA17482 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com> <87383iob0i dot fsf at igel dot home> <5541548F dot 40608 at redhat dot com> <20150429222548 dot GB17482 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com> <55415B46 dot 5020801 at redhat dot com> <20150430001316 dot GC17482 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com> <20150430021055 dot GD17482 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com> <87mw1qhzsi dot fsf at igel dot home> <20150430115718 dot GA1508 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Apr 30, 2015 at 07:58:33AM -0400, Trevor Saunders wrote:
> On Thu, Apr 30, 2015 at 08:54:05AM +0200, Andreas Schwab wrote:
> > Trevor Saunders <tbsaunde@tbsaunde.org> writes:
> >
> > >> diff --git a/libobjc/encoding.c b/libobjc/encoding.c
> > >> index 7333908..20ace46 100644
> > >> --- a/libobjc/encoding.c
> > >> +++ b/libobjc/encoding.c
> > >> @@ -1167,7 +1167,7 @@ objc_layout_structure_next_member (struct objc_struct_layout *layout)
> > >> /* Record must have at least as much alignment as any field.
> > >> Otherwise, the alignment of the field within the record
> > >> is meaningless. */
> > >> -#ifndef PCC_BITFIELD_TYPE_MATTERS
> > >> +#if !PCC_BITFIELD_TYPE_MATTERS
> >
> > With `#define PCC_BITFIELD_TYPE_MATTERS true' this expands to `#if
> > !true' which evaluates to 1 since true isn't a defined identifier?
>
> I think true is a defined identifier since this is compiled as c11.
true is not a defined identifier, neither in C89, nor in C99, nor in C11.
In C, true may be a macro if stdbool.h is included.
system.h has:
#undef TRUE
#undef FALSE
#ifdef __cplusplus
/* Obsolete. */
# define TRUE true
# define FALSE false
#else /* !__cplusplus */
# undef bool
# undef true
# undef false
# define bool unsigned char
# define true 1
# define false 0
/* Obsolete. */
# define TRUE true
# define FALSE false
#endif /* !__cplusplus */
if it is included.
Jakub