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: [janitor] convert some c-* files to C90


> 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;



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