This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/8] add default for PCC_BITFIELD_TYPE_MATTERS


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.

tbsaunde@iceball:/src/gcc1-opt$ cat test.c
#define FOO true
#if !FOO
hello
#endif
tbsaunde@iceball:/src/gcc1-opt$ gcc/xgcc -B gcc/ -E test.c
# 1 "test.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "test.c"


hello
tbsaunde@iceball:/src/gcc1-opt$

Trev

> 
> Andreas.
> 
> -- 
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
> "And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]