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?










share|improve this question
























  • 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

















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?










share|improve this question
























  • 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















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?










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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




















  • 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



















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














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





















































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







Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

TypeError: fit_transform() missing 1 required positional argument: 'X'