This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C PATCH] Make attributes accept enum values (PR c/50459)
- From: Marek Polacek <polacek at redhat dot com>
- To: Dominique Dhumieres <dominiq at lps dot ens dot fr>
- Cc: joseph at codesourcery dot com, iains at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Mon, 12 May 2014 18:14:29 +0200
- Subject: Re: [C PATCH] Make attributes accept enum values (PR c/50459)
- Authentication-results: sourceware.org; auth=none
- References: <20140510141047 dot 3D98C103 at mailhost dot lps dot ens dot fr> <20140511180141 dot GD23554 at redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1405121543190 dot 371 at digraph dot polyomino dot org dot uk> <20140512161116 dot 87903106 at mailhost dot lps dot ens dot fr>
On Mon, May 12, 2014 at 06:11:16PM +0200, Dominique Dhumieres wrote:
> Joseph,
>
> > I don't think the whole test should be skipped for that issue; I think the
> > part requiring this feature should be split out into a separate testcase,
> > so that as much as possible is still tested on Darwin.
>
> Is the following patch
>
> --- ../_clean/gcc/testsuite/c-c++-common/pr50459.c 2014-05-09 10:34:03.000000000 +0200
> +++ gcc/testsuite/c-c++-common/pr50459.c 2014-05-12 17:55:04.000000000 +0200
> @@ -5,8 +5,8 @@
> enum { A = 128, B = 1 };
> void *fn1 (void) __attribute__((assume_aligned (A)));
> void *fn2 (void) __attribute__((assume_aligned (A, 4)));
> -void fn3 (void) __attribute__((constructor (A)));
> -void fn4 (void) __attribute__((destructor (A)));
> +void fn3 (void) __attribute__((constructor (A))); /* { dg-error "constructor priorities are not supported" { target *-apple-darwin* } } */
> +void fn4 (void) __attribute__((destructor (A))); /* { dg-error "destructor priorities are not supported" { target *-apple-darwin* } } */
> void *fn5 (int) __attribute__((alloc_size (B)));
> void *fn6 (int) __attribute__((alloc_align (B)));
> void fn7 (const char *, ...) __attribute__ ((sentinel (B)));
>
> what you have in mind?
I don't think so, we should split the pr50459.c into two .c files, the first
containing only the cdtor tests and requiring init_priotity targets,
the second one the rest (and not requiring init_priotity targets).
Marek