This is the mail archive of the
mailing list for the GCC project.
Re: avr-rtems broken on trunk -- need advice
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Mon, 12 Oct 2015 22:25:05 +0000
- Subject: Re: avr-rtems broken on trunk -- need advice
- Authentication-results: sourceware.org; auth=none
- References: <561C11EB dot 7040601 at redhat dot com>
On Mon, 12 Oct 2015, Jeff Law wrote:
> In the interest of keeping my sanity, I'd just change that last default value
> to something like "unknown type error" or somesuch. But I'm sure there's a
> better way. Suggestions?
The *right* fix is both of the following (either would suffice on its own
for the present problem but the desired end state is for both to be done):
* These target macros turn into hooks (maybe hooks that take a width
parameter, a signedness parameter and one saying which set of stdint.h
types is involved, rather than one per macro).
* These macros / hooks (including relating ones such as SIZE_TYPE) return
enums rather than strings (with a suitably chosen value meaning "no such
type" - probably itk_none if enum integer_type_kind is used).
Conversion of target macros to hooks is a pretty general solution for any
sort of issue with target-specific warnings related to the definition of a
target macro. Converting to enums would avoid the problem call to strlen
(and the need for the Fortran front-end to have its own logic for handling
type name strings like this - see trans-types.c:get_typenode_from_name -
to implement the bindings to C types).
Joseph S. Myers