Re: ver 4.0 builtin_chosen_warning ???

new topic     » goto parent     » topic index » view thread      » older message » newer message
bernie said...

What the heck does mean ???  
what compare() ??? 
What global/export function ??? 
Where in my 3,371 line program ???????????????  
 
 
Warning ( builtin_chosen_warning ): 
        built-in compare() chosen over global/export function in: D:\#EU40\INCLUDE\std/map.e 
 
 
Press Enter... 

Basically, it's part of the new symbol resolution. In 3.1, if compare() were defined somewhere in code, it would override the built-in version. That only happens now if it is defined with the override keyword, which is an indication that it is meant to override the built-in.

The compare() in map.e is not meant to override the built-in, and is not declared with override. In order to call it, you would need to use a qualified call (i.e., use a namespace).

The logic behind the warning is that you might have meant to call the map version of compare(), since both the built-in and the map version of compare() are in scope, but forgot to use the namespace to qualify the call. So it issues the warning you saw to indicate what's going on. There is also a namespace for built-in routines: eu. Using that would also avoid the warning.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu