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]

Re: Some more fortran safe-ctype & cleanups


On Wed, Oct 24, 2001 at 12:00:34PM -0400, Kaveh R. Ghazi wrote:
>  > From: Neil Booth <neil@daikokuya.demon.co.uk>
>  > Kaveh R. Ghazi wrote:-
>  > > One note, there was no direct equivalent to is_hor_space in
>  > > safe-ctype, so it became ISSPACE && != '\n'.
>  > 
>  > is_nvspace() is what cpplib uses.
>  > Neil.
> 
> Yes but as I alluded to in my original posting, its not an exact
> match, is_hor_space is true for ' ', '\t', '\v', '\f' and '\r' while
> is_nvspace is true for ' ', '\t', '\v', '\f', and '\0'.
> 
> The difference is '\r' vs '\0'.

The reason \r isn't in is_nvspace is because it's vertical space: \r\n
is the DOS line terminator and \r alone is the pre-OSX Mac line
terminator.  cpplib wants to be able to cope with whichever form you
throw at it.  It would be a good thing if all GCC front ends did the
same.

'\0' is in is_nvspace because we decided it made the most sense to
treat it as whitespace.  It's a bit risky to add that to the set used
by Fortran without making sure that this won't break anything else.

zw


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