How to define implementation specific (XC8) int types in pc-lint?
up vote
1
down vote
favorite
Microchip XC8 has non-standard int types - __int24 and __uint24 and produced from them (by typedef) int24_t and uint24_t.
However, pc-lint does not know about them. What is the way to make pc-lint know about these types?
c static-analysis pic microchip pc-lint
add a comment |
up vote
1
down vote
favorite
Microchip XC8 has non-standard int types - __int24 and __uint24 and produced from them (by typedef) int24_t and uint24_t.
However, pc-lint does not know about them. What is the way to make pc-lint know about these types?
c static-analysis pic microchip pc-lint
There should be a folder with compiler specific settings in your pc-lint install folder. Have you checked it?
– A.R.C.
Nov 19 at 13:53
Include the relevant header file? I would have expected a tool to be able to correctly use any defined type.
– Tim Randall
Nov 19 at 14:52
You can use e.g.-d__int24=int -d__uint24=unsigned
, but then PC-lint will obviously treat the types as ints instead.
– Lars Ljung
Nov 19 at 20:21
@TimRandall pc-lint is not very intuitive in doing anything automatically. You have to configure the whole lint monster yourself.
– A.R.C.
Nov 20 at 6:44
There is file co-xc8.lnt but there is nothing about__int24
and__uint24
in it. I suppose that a good solution could be-d__int24=int32_t
,-d__uint24=uint32_t
, also-dint24_t=int32_t
,-duint24_t=uint32_t
.
– Ivan Cenov
Nov 20 at 13:45
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Microchip XC8 has non-standard int types - __int24 and __uint24 and produced from them (by typedef) int24_t and uint24_t.
However, pc-lint does not know about them. What is the way to make pc-lint know about these types?
c static-analysis pic microchip pc-lint
Microchip XC8 has non-standard int types - __int24 and __uint24 and produced from them (by typedef) int24_t and uint24_t.
However, pc-lint does not know about them. What is the way to make pc-lint know about these types?
c static-analysis pic microchip pc-lint
c static-analysis pic microchip pc-lint
edited Nov 19 at 13:30
Mike
1,6831421
1,6831421
asked Nov 19 at 12:30
Ivan Cenov
5114
5114
There should be a folder with compiler specific settings in your pc-lint install folder. Have you checked it?
– A.R.C.
Nov 19 at 13:53
Include the relevant header file? I would have expected a tool to be able to correctly use any defined type.
– Tim Randall
Nov 19 at 14:52
You can use e.g.-d__int24=int -d__uint24=unsigned
, but then PC-lint will obviously treat the types as ints instead.
– Lars Ljung
Nov 19 at 20:21
@TimRandall pc-lint is not very intuitive in doing anything automatically. You have to configure the whole lint monster yourself.
– A.R.C.
Nov 20 at 6:44
There is file co-xc8.lnt but there is nothing about__int24
and__uint24
in it. I suppose that a good solution could be-d__int24=int32_t
,-d__uint24=uint32_t
, also-dint24_t=int32_t
,-duint24_t=uint32_t
.
– Ivan Cenov
Nov 20 at 13:45
add a comment |
There should be a folder with compiler specific settings in your pc-lint install folder. Have you checked it?
– A.R.C.
Nov 19 at 13:53
Include the relevant header file? I would have expected a tool to be able to correctly use any defined type.
– Tim Randall
Nov 19 at 14:52
You can use e.g.-d__int24=int -d__uint24=unsigned
, but then PC-lint will obviously treat the types as ints instead.
– Lars Ljung
Nov 19 at 20:21
@TimRandall pc-lint is not very intuitive in doing anything automatically. You have to configure the whole lint monster yourself.
– A.R.C.
Nov 20 at 6:44
There is file co-xc8.lnt but there is nothing about__int24
and__uint24
in it. I suppose that a good solution could be-d__int24=int32_t
,-d__uint24=uint32_t
, also-dint24_t=int32_t
,-duint24_t=uint32_t
.
– Ivan Cenov
Nov 20 at 13:45
There should be a folder with compiler specific settings in your pc-lint install folder. Have you checked it?
– A.R.C.
Nov 19 at 13:53
There should be a folder with compiler specific settings in your pc-lint install folder. Have you checked it?
– A.R.C.
Nov 19 at 13:53
Include the relevant header file? I would have expected a tool to be able to correctly use any defined type.
– Tim Randall
Nov 19 at 14:52
Include the relevant header file? I would have expected a tool to be able to correctly use any defined type.
– Tim Randall
Nov 19 at 14:52
You can use e.g.
-d__int24=int -d__uint24=unsigned
, but then PC-lint will obviously treat the types as ints instead.– Lars Ljung
Nov 19 at 20:21
You can use e.g.
-d__int24=int -d__uint24=unsigned
, but then PC-lint will obviously treat the types as ints instead.– Lars Ljung
Nov 19 at 20:21
@TimRandall pc-lint is not very intuitive in doing anything automatically. You have to configure the whole lint monster yourself.
– A.R.C.
Nov 20 at 6:44
@TimRandall pc-lint is not very intuitive in doing anything automatically. You have to configure the whole lint monster yourself.
– A.R.C.
Nov 20 at 6:44
There is file co-xc8.lnt but there is nothing about
__int24
and __uint24
in it. I suppose that a good solution could be -d__int24=int32_t
, -d__uint24=uint32_t
, also -dint24_t=int32_t
, -duint24_t=uint32_t
.– Ivan Cenov
Nov 20 at 13:45
There is file co-xc8.lnt but there is nothing about
__int24
and __uint24
in it. I suppose that a good solution could be -d__int24=int32_t
, -d__uint24=uint32_t
, also -dint24_t=int32_t
, -duint24_t=uint32_t
.– Ivan Cenov
Nov 20 at 13:45
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53374701%2fhow-to-define-implementation-specific-xc8-int-types-in-pc-lint%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
There should be a folder with compiler specific settings in your pc-lint install folder. Have you checked it?
– A.R.C.
Nov 19 at 13:53
Include the relevant header file? I would have expected a tool to be able to correctly use any defined type.
– Tim Randall
Nov 19 at 14:52
You can use e.g.
-d__int24=int -d__uint24=unsigned
, but then PC-lint will obviously treat the types as ints instead.– Lars Ljung
Nov 19 at 20:21
@TimRandall pc-lint is not very intuitive in doing anything automatically. You have to configure the whole lint monster yourself.
– A.R.C.
Nov 20 at 6:44
There is file co-xc8.lnt but there is nothing about
__int24
and__uint24
in it. I suppose that a good solution could be-d__int24=int32_t
,-d__uint24=uint32_t
, also-dint24_t=int32_t
,-duint24_t=uint32_t
.– Ivan Cenov
Nov 20 at 13:45