> #pragma __use_linkage __str_link2 (strcasecmp)
I live to serve.
alp $ gdiff badcondit.c badcondit_2.c
2a3,4
> #pragma __use_linkage __str_link2 (strcasecmp)
>
alp $
alp $ cc badcondit_2.c
= opt_ignore_case ? strcasecmp : strcmp;
..............^
%CC-W-PTRMISMATCH, In the initializer for cmp, the referenced type of the pointe
r value "opt_ignore_case?strcasecmp:strcmp" is "function (pointer to const char,
pointer to const char) returning int [with linkage __str_link2]", which is not
compatible with
"function (pointer to const char, pointer to const char) returning int".
at line number 10 in file ALP$DKA0:[SMS]BADCONDIT_2.C;1
I don't know what this stuff means, but I may
be little more confused than the compiler.
Looking at , it seems that these
"#pragma __linkage" things have to do with
exotic register usage:
[...]
/*
** DEC C RTL Performance (Linkages)
**
** Certain DEC C RTL functions are defined with linkages declared
** which gives the compiler more information as to register usage in
** the implementation.
*/
#if defined(__ALPHA) && defined(__DECC)
# pragma __linkage __str_link1 = (\
__notused(__r1,__r2,__r3,__r4,__r5,__r6,__r7,__r8,__r9,__r10,__r11,\
[...]
So applying one of them to some unsuspecting
function might be unwise in any case.
[...]
#elif defined(__ia64) && defined(__DECC)
/*
** Should define "similar" linkages for ia64, but they cannot be exactly
** the same because the register conventions are different.
** ***TBD for ia64***
*/
#endif
[...]
Might not be such a clever idea after all.
If this stuff makes compatible-looking
functions incompatible, then it might be nice
to get rid of it, or else make it easy for
the user to get rid of it. I hope that that
"Performance" gain was a big one.