This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [janitor] convert some c-* files to C90
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Andreas Jaeger <aj at suse dot de>
- Cc: Eric Botcazou <ebotcazou at libertysurf dot fr>, gcc-patches at gcc dot gnu dot org, Richard dot Earnshaw at arm dot com
- Date: Fri, 20 Jun 2003 09:43:51 +0100
- Subject: Re: [janitor] convert some c-* files to C90
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Eric Botcazou <ebotcazou@libertysurf.fr> writes:
>
> >> 2003-06-19 Andreas Jaeger <aj@suse.de>
> >>
> >> * c-aux-info.c: Convert to ISO C99.
> >
> > ISO C90.
>
> Yeah, that's what I meant - but it's not really wrong since ISO C90
> prototypes are also ISO C99 prototypes...
>
> I'll change the ChangeLog nevertheless.
>
Can you also change the files you've converted so that they are also C90?
:-)
Your change doesn't compile with gcc-2.95.
"_Bool" is NOT in C90. Please make sure you use "bool" which the compiler
can map onto char if a builtin bool isn't supported.
R.
Example of incorrect change:
*************** get_nonnull_operand (arg_num_expr, valp)
*** 6077,6088 ****
struct attribute_spec.handler. */
static tree
! handle_nothrow_attribute (node, name, args, flags, no_add_attrs)
! tree *node;
! tree name;
! tree args ATTRIBUTE_UNUSED;
! int flags ATTRIBUTE_UNUSED;
! bool *no_add_attrs;
{
if (TREE_CODE (*node) == FUNCTION_DECL)
TREE_NOTHROW (*node) = 1;
--- 5852,5859 ----
struct attribute_spec.handler. */
static tree
! handle_nothrow_attribute (tree *node, tree name, tree args
ATTRIBUTE_UNUSED,
! int flags ATTRIBUTE_UNUSED, _Bool *no_add_attrs)
{
if (TREE_CODE (*node) == FUNCTION_DECL)
TREE_NOTHROW (*node) = 1;