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] Speed-up get_identifier("main")


 > From: Roger Sayle <roger@eyesopen.com>
 > 
 > > The cast to unsigned of the strlen was only necessary when prototypes
 > > were missing in traditional C.
 > 
 > I've kept the explicit cast to (unsigned int) in the latest version of
 > my patch.  Many compilers issue warnings about implicit loss of precision
 > converting the size_t returned by strlen into the unsigned int required
 > by the prototype.  Whilst an explicit cast isn't required, it helps
 > silence compiler warnings from non-GCC host compilers.

<Shrug> okay.

 > 
 > At some point in the future, we may even enable such portability warnings
 > by default during GCC bootstraps.
 > 
 > Roger

You mean -Wconversion?  IIRC it was too noisy to be useful, especially
on LP64 platforms or targets where HOST_WIDE_INT is long long.  But I
haven't tried it in a very long time so I could be mistaken.

--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu


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