D2007 compiler warning msg: Inline function 'AnsiSameStr' has not been expanded because unit 'Windows' is not specified in USES list

This is a discussion on D2007 compiler warning msg: Inline function 'AnsiSameStr' has not been expanded because unit 'Windows' is not specified in USES list within the Delphi forums in Programming Languages category; I am getting the following compiler warning msg: [DCC Warning] ConfigINIFile.pas(661): H2443 Inline function 'AnsiSameStr' has not been expanded because unit 'Windows' is not specified in USES list what does it mean?...

Go Back   Application Development Forum > Programming Languages > Delphi

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-06-2008, 12:41 PM
Ed Dressel
Guest
 
Default D2007 compiler warning msg: Inline function 'AnsiSameStr' has not been expanded because unit 'Windows' is not specified in USES list

I am getting the following compiler warning msg:

[DCC Warning] ConfigINIFile.pas(661): H2443 Inline function
'AnsiSameStr' has not been expanded because unit 'Windows' is not specified
in USES list

what does it mean?


Reply With Quote
  #2  
Old 08-06-2008, 01:20 PM
Remy Lebeau \(TeamB\)
Guest
 
Default Re: D2007 compiler warning msg: Inline function 'AnsiSameStr' has not been expanded because unit 'Windows' is not specified in USES list


"Ed Dressel" <none@none.com> wrote in message
news:4899d43b$1@newsgroups.borland.com...

> I am getting the following compiler warning msg:
>
> [DCC Warning] ConfigINIFile.pas(661): H2443 Inline function
> 'AnsiSameStr' has not been expanded because unit 'Windows' is
> not specified in USES list
>
> what does it mean?


It means exactly what it says.

On Windows, AnsiSameStr() calls CompareString(), which is declared in the
Windows unit. Since AnsiSameStr() is marked as inlined, any code of yours
that calls AnsiSameStr() can actually call CompareString() directly instead
if Windows is in your 'uses' clause. Since it is not currently in your
'uses' clause, the function cannot be compiled inlined, thus the warning.


Gambit


Reply With Quote
  #3  
Old 08-06-2008, 01:32 PM
Dennis Passmore
Guest
 
Default Re: D2007 compiler warning msg: Inline function 'AnsiSameStr' has not been expanded because unit 'Windows' is not specified in USES list

add SysUtils to your USES list then


Reply With Quote
  #4  
Old 08-06-2008, 09:00 PM
Rob Kennedy
Guest
 
Default Re: D2007 compiler warning msg: Inline function 'AnsiSameStr' hasnot been expanded because unit 'Windows' is not specified in USES list

Dennis Passmore wrote:
> add SysUtils to your USES list then


He already has it there. If he didn't, then the compiler would have
complained about an undeclared identifier named AnsiSameStr.

The warning plainly says that Windows is the one that's missing.

--
Rob
Reply With Quote
  #5  
Old 08-06-2008, 09:24 PM
Ed Dressel
Guest
 
Default Re: D2007 compiler warning msg: Inline function 'AnsiSameStr' has not been expanded because unit 'Windows' is not specified in USES list

> On Windows, AnsiSameStr() calls CompareString(), which is declared in the
> Windows unit. Since AnsiSameStr() is marked as inlined, any code of yours
> that calls AnsiSameStr() can actually call CompareString() directly
> instead if Windows is in your 'uses' clause. Since it is not currently in
> your 'uses' clause, the function cannot be compiled inlined, thus the
> warning.


thanks. I did not know Delphi supported inline functions.



Reply With Quote
  #6  
Old 08-07-2008, 05:55 AM
Peter Below (TeamB)
Guest
 
Default Re: D2007 compiler warning msg: Inline function 'AnsiSameStr' has not been expanded because unit 'Windows' is not specified in USES list

Ed Dressel wrote:

> thanks. I did not know Delphi supported inline functions.


It's a relatively recent addition. Delphi 2006 I think.

--
Peter Below (TeamB)
Don't be a vampire (http://slash7.com/pages/vampires),
use the newsgroup archives :
http://www.tamaracka.com/search.htm
http://groups.google.com
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 08:17 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.