info 1784

Post a reply

This question is a means of preventing automated form submissions by spambots.

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is OFF
Smilies are OFF

Topic review

Expand view Topic review: info 1784

Re: info 1784

by DOS622 » Tue Nov 20, 2018 8:58 pm

Messages in the "info" category do not necessarily indicate a critical problem. They draw your attention to something that may warrant a closer look. Based on the description for this message in the manual it appears the intention is to alert you that the declarations differ so that you can decide which one is correct and do not mistakenly assume that a function is not extern "C" from glancing at a definition that did not repeat it.

If you aren't interested in this message you can disable it with the option -e1784. Conversely, there are many "elective note" messages which are disabled by default and can be enabled individually with a +e option or all together with the option -w4.

info 1784

by SeeCwriter » Tue Nov 20, 2018 6:02 pm

I'm using v1.2 of PC-lint Plus. I get information message 1784 for functions in a cpp file that were declared as "extern C" in the header file. It's my understanding that wrapping the function prototype in the "extern C" declaration is sufficient. That it's not necessary to also wrap the function in an "extern C" declaration. In fact, the prototype of function main() is declared as "extern C", and the function itself is not so declared, yet I get no info 1784 message for that.

snmp_mib_api.cpp 28 info 1784: symbol 'snmp_init_idVersion' previously
declared as "C"
void snmp_init_idVersion( char *buf )