gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] ARM port problem in rtcm3.2 handling


From: Hal Murray
Subject: Re: [gpsd-dev] ARM port problem in rtcm3.2 handling
Date: Thu, 21 Apr 2016 19:45:51 -0700

address@hidden said:
>> > I had been thinking that since fiexed width type (uint88_t, etc.)
>> > are in C99 we should use those instead.  But I see in C99 7.1.1.1 3
>> > that fixed width types are optional.  I don't recall that ever
>> > causing us trouble. 
>> So what do I do if I want a signed 8 bit int?  How would you have fixed 
this
>> if the ARM was wrong?

I just poked around and learned that there are "signed char"s.  Somehow, I 
don't remember ever  running into them before.  That answers my question 
above.

Grep only finds 4 of them in gpsd.

There are 2 in ntpsec, both in tests/unity/unity_internals.h:


> They're optional in C99 but not in POSIX-2001 and descendants.  It's been at
> least a decade since anyone shipped a C or C++ compiler without them. We're
> considering them save for NTPsec; GPSD can, too. 

My take from this is that "char" without a modifier is evil.  Unfortunately, 
it's used all over the place, starting with string literals.

Are there any static code checking tools that check for it?  If so, what do 
they actually check for?



-- 
These are my opinions.  I hate spam.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]