info 1784

PC-lint Plus User Discussion
Post Reply

info 1784

Post by SeeCwriter »

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 )

Re: info 1784

Post by DOS622 »

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.
Post Reply