Quellcode durchsuchen

Merged revisions 9879,10082,10129-10130,10134 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r9879 | yury | 2008-01-23 12:24:04 +0200 (Ср, 23 янв 2008) | 2 lines

* Fixed bug #10681.
+ Test.
........
r10134 | yury | 2008-02-01 19:39:02 +0200 (Пт, 01 фев 2008) | 2 lines

* Fixed wince compilation.
* Added some constants.
........

git-svn-id: branches/fixes_2_2@10137 -

yury vor 17 Jahren
Ursprung
Commit
fc6e00fd67
5 geänderte Dateien mit 25 neuen und 3 gelöschten Zeilen
  1. 1 0
      .gitattributes
  2. 5 1
      compiler/defcmp.pas
  3. 1 1
      rtl/wince/sysutils.pp
  4. 3 1
      rtl/wince/wininc/coredll.inc
  5. 15 0
      tests/webtbs/tw10681.pp

+ 1 - 0
.gitattributes

@@ -7830,6 +7830,7 @@ tests/webtbs/tw10623.pp svneol=native#text/plain
 tests/webtbs/tw1066a.pp svneol=native#text/plain
 tests/webtbs/tw1066b.pp svneol=native#text/plain
 tests/webtbs/tw1068.pp svneol=native#text/plain
+tests/webtbs/tw10681.pp svneol=native#text/plain
 tests/webtbs/tw1071.pp svneol=native#text/plain
 tests/webtbs/tw1073.pp svneol=native#text/plain
 tests/webtbs/tw1081.pp svneol=native#text/plain

+ 5 - 1
compiler/defcmp.pas

@@ -523,8 +523,12 @@ implementation
                        eq:=te_equal
                      else
                        begin
+                         { Delphi does not allow explicit type conversions for float types like:
+                             single_var:=single(double_var);
+                           But if such conversion is inserted by compiler (internal) for some purpose,
+                           it should be allowed even in Delphi mode. }
                          if (fromtreetype=realconstn) or
-                            not((cdo_explicit in cdoptions) and
+                            not((cdoptions*[cdo_explicit,cdo_internal]=[cdo_explicit]) and
                                 (m_delphi in current_settings.modeswitches)) then
                            begin
                              doconv:=tc_real_2_real;

+ 1 - 1
rtl/wince/sysutils.pp

@@ -742,7 +742,7 @@ Function GetAppConfigDir(Global : Boolean) : String;
 
 begin
   If Global then
-    Result:=GetSpecialDir(CSIDL_COMMON_APPDATA)
+    Result:=GetSpecialDir(CSIDL_WINDOWS)
   else
     Result:=GetSpecialDir(CSIDL_APPDATA);
   If (Result<>'') then

+ 3 - 1
rtl/wince/wininc/coredll.inc

@@ -2173,9 +2173,11 @@ const
   CSIDL_DRIVES             = $0011;
   CSIDL_NETWORK            = $0012;
   CSIDL_NETHOOD            = $0013;
-  CSIDL_FONTS		   = $0014;
+  CSIDL_FONTS		           = $0014;
   CSIDL_TEMPLATES          = $0015;
   CSIDL_APPDATA            = $001a;
+  CSIDL_WINDOWS            = $0024;
+  CSIDL_PROGRAM_FILES      = $0026;
 
 //*****************************************************************************
 // types

+ 15 - 0
tests/webtbs/tw10681.pp

@@ -0,0 +1,15 @@
+{%norun}
+
+{$IFDEF FPC}
+ {$MODE Delphi}
+{$ENDIF}
+
+var
+  AStr : string;
+  AComp : Comp;
+  AInt : Integer;
+
+begin
+  AStr := '1.2345';
+  Val(AStr, AComp, AInt);
+end.