[fpc-devel] make all OPT="gtl"

2009-10-07 Thread Vincent Snijders

Hi,

make all OPT="-gtl" in the fpc source fails.
/home/vincent/src/fpc/trunk/compiler/ppc1 -Ur -Ur -Xs -O2 -n -Fi../inc 
-Fi../i386 -Fi../unix -Fii386 -FE. 
-FU/home/vincent/src/fpc/trunk/rtl/units/i386-linux -gtl -di386 
-dRELEASE -Us -Sg system.pp

Fatal: Compilation aborted
An unhandled exception occurred at $08139C93 :
EAccessViolation : Access violation
  $08139C93  DO_PROC_CALL,  line 913 of pexpr.pas
  $0813D6C6  FACTOR_READ_ID,  line 1587 of pexpr.pas
  $0813A9F9  FACTOR,  line 2209 of pexpr.pas
  $0813B51B  FACTOR,  line 2482 of pexpr.pas
  $0813D913  SUB_EXPR,  line 2654 of pexpr.pas
  $0813D924  SUB_EXPR,  line 2656 of pexpr.pas
  $0813D924  SUB_EXPR,  line 2656 of pexpr.pas
  $0813D924  SUB_EXPR,  line 2656 of pexpr.pas
  $0813DD76  COMP_EXPR,  line 2744 of pexpr.pas
  $0814AA40  READ_TYPED_CONST_DATA,  line 1358 of ptconst.pas
  $081309B1  CONST_DEC,  line 244 of pdecl.pas
  $0812C610  READ_INTERFACE_DECLARATIONS,  line 1779 of psub.pas
  $0817405E  PROC_UNIT,  line 1043 of pmodules.pas
  $081608CD  COMPILE,  line 394 of parser.pas
  $08067C68  COMPILE,  line 246 of compiler.pas
  $08048236  main,  line 223 of pp.pas

Should I create a bug report or is using -gt for the compiler not supported.

Vincent
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] russian compiler messages

2009-10-07 Thread dmitry boyarintsev
On Wed, Oct 7, 2009 at 5:50 PM, Sergei Gorelkin  wrote:
> Updating done, revisions 13814 and 13815. Enjoy :)
> And criticism is welcome, too.

Great job! Translation is much better than before.
You need to ask russian comminity about it, since they're to use these messages.
These messages should be very useful for schools, using Lazarus in education.

some ideas:
There're multiple messages, where "ОС назначения" is used. It doesn't
sound right. imho, It should be "выбранная ОС" or "целевая ОС" or
""текущая ОС" or "текущая платформа" or "выбранная платформа" or
"целевая платформа".
Just like in other messages: 03248_E_Символы "weak external" не
поддерживаются на *целевой платформе*

03048: Заголовок фyнкции не соответствует ни одному из методов этого
класса "$1"
Since message is showing what class is used, there's no need in word "этого"

03085: Повторное бросание исключения здесь невозможно
AFAIK, it's more common in russian tech-papers and books to use verb
"возбуждение" (which is closer to pascal's "raise") instead of
"бросание" (which is closer to Cpp's "throw").

thanks,
dmitry
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Errors using generics - what is wrong?

2009-10-07 Thread Žilvinas Ledas
Yes, I had an internal error and now I know why - I used specialization 
in function params. This gives internal error:

procedure asdasd(something: specialize TTwoValuesList);
begin
end;

I'll make a bug report tomorow or a day after.

And yes, I think a descriptive message saying to use typed 
specialization would be nice for those using generics first time.



Regards,
Zilvinas



Tomas Hajny wrote:

On Wed, October 7, 2009 18:47, Micha Nelissen wrote:
  

Tomas Hajny wrote:


Well, the internal error is in any case a bug, so if this appears also
with the latest (trunk) version, a bug report would be useful.
  

I didn't see an internal error? But a more descriptive message would be
useful ('specialization not allowed in this context' or so?).



The original post mentioned "Fatal: Internal error 200204175".

Tomas
  

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] russian compiler messages

2009-10-07 Thread Sergei Gorelkin

Florian Klaempfl wrote:

Sergei Gorelkin schrieb:

Florian Klaempfl wrote:


So, who will be the first to creat a Mantis entry? :-)

I gave you both access to trunk/compiler/msg, so please update things as
needed ;)

Actually write access and commit as need :)

Ok, that simplifies things: no need to pollute Mantis, and can do
several iterations. Thank you.


The question is - Is the trunk version sufficient to get into 2.4 (I had
synchronized with errore.msg rev. 13665), or I should sync with some
other revision ?


Trunk is fine, we can merge it then to fixes.


Updating done, revisions 13814 and 13815. Enjoy :)
And criticism is welcome, too.

Sergei

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Errors using generics - what is wrong?

2009-10-07 Thread Tomas Hajny
On Wed, October 7, 2009 18:47, Micha Nelissen wrote:
> Tomas Hajny wrote:
>> Well, the internal error is in any case a bug, so if this appears also
>> with the latest (trunk) version, a bug report would be useful.
>
> I didn't see an internal error? But a more descriptive message would be
> useful ('specialization not allowed in this context' or so?).

The original post mentioned "Fatal: Internal error 200204175".

Tomas


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Errors using generics - what is wrong?

2009-10-07 Thread Micha Nelissen

Tomas Hajny wrote:

Well, the internal error is in any case a bug, so if this appears also
with the latest (trunk) version, a bug report would be useful.


I didn't see an internal error? But a more descriptive message would be 
useful ('specialization not allowed in this context' or so?).


Micha
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


RE: [fpc-devel] fp IDE with libgdb

2009-10-07 Thread Pierre Muller
True in principle,
but XML library used for GDb
is expat, so you should
add {$linklib expat.a}
in gdbint.pp

It is generally easier to 
first try to compile
testgdb executable 
in packages/gdbint directory.

Once this executable links without errors,
with the same libraries, it should
also work for the IDE.

Pierre Muller

> -Message d'origine-
> De : fpc-devel-boun...@lists.freepascal.org [mailto:fpc-devel-
> boun...@lists.freepascal.org] De la part de Felipe Monteiro de Carvalho
> Envoyé : Wednesday, October 07, 2009 1:28 PM
> À : FPC developers' list
> Objet : Re: [fpc-devel] fp IDE with libgdb
> 
> On Mon, Oct 5, 2009 at 10:27 AM, Mark Morgan Lloyd
>  wrote:
> > Linking testgdb
> > /usr/local/lib/fpc/2.2.4/units/powerpc-linux/gdbint/gdbint.o: In
> function
> > `GDBINT_INITLIBGDB':
> > gdbint.pp:(.text+0x1a60): undefined reference to `error_init'
> > libgdb.a(xml-support.o): In function `gdb_xml_use_dtd':
> > /usr/local/src/fpc/libgdb/gdb-6.7.1/gdb/xml-support.c:522: undefined
> > reference to `XML_SetParamEntityParsing'
> > /usr/local/src/fpc/libgdb/gdb-6.7.1/gdb/xml-support.c:524: undefined
> > reference to `XML_SetExternalEntityRefHandler'
> > /usr/local/src/fpc/libgdb/gdb-6.7.1/gdb/xml-support.c:528: undefined
> > reference to `XML_UseForeignDTD'
> 
> If libgdb wants more functions then just link more libraries to get
> the necessary functions until it is happy.
> 
> Find out which library offers the routines it wants and link them to
> your application too. I would guess it wants libxml, so something like
> {$linklib xml} or {$linklib libxml)
> 
> --
> Felipe Monteiro de Carvalho
> ___
> fpc-devel maillist  -  fpc-devel@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] SetString difference between Ansistring and UnicodeString

2009-10-07 Thread Vincent Snijders

Sergei Gorelkin schreef:



Yes, please do so.


http://bugs.freepascal.org/view.php?id=14740

Vincent
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fp IDE with libgdb

2009-10-07 Thread Mark Morgan Lloyd

Felipe Monteiro de Carvalho wrote:

On Mon, Oct 5, 2009 at 10:27 AM, Mark Morgan Lloyd
 wrote:

Linking testgdb
/usr/local/lib/fpc/2.2.4/units/powerpc-linux/gdbint/gdbint.o: In function
`GDBINT_INITLIBGDB':
gdbint.pp:(.text+0x1a60): undefined reference to `error_init'
libgdb.a(xml-support.o): In function `gdb_xml_use_dtd':
/usr/local/src/fpc/libgdb/gdb-6.7.1/gdb/xml-support.c:522: undefined
reference to `XML_SetParamEntityParsing'
/usr/local/src/fpc/libgdb/gdb-6.7.1/gdb/xml-support.c:524: undefined
reference to `XML_SetExternalEntityRefHandler'
/usr/local/src/fpc/libgdb/gdb-6.7.1/gdb/xml-support.c:528: undefined
reference to `XML_UseForeignDTD'


If libgdb wants more functions then just link more libraries to get
the necessary functions until it is happy.

Find out which library offers the routines it wants and link them to
your application too. I would guess it wants libxml, so something like
{$linklib xml} or {$linklib libxml)


I tried that and didn't get anywhere. I'll try again presently but am 
currently focusing on SPARC.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] Unused compiler messages

2009-10-07 Thread Sergei Gorelkin

Hello,

While updating the Russian message file, I discovered that (at least) 
the following messages are not used in compiler source

(only in msg directory and msgtxt.inc):

3060, 3062, 3066, 3071, 3092, 3107, 3125, 3146, 3148, 3168, 3179, 3218,
5001, 5012, 5013,
6015, 6017, 6031, 6032, 6033, 6038, 6041, 6042, 6043,
7016, 7018, 7061, 7066, 7072, 7074, 7077, 7082,
8002, 8003, 8005, 8013, 8014, 8015, 8017, 8018,
9000,
10015, 10017, 10023, 10029, 10030, 10031, 10032, 10033, 10034, 10035,
10037, 10040

While some of these can be meant for implementing something in the 
future, most refer to some ugly hacks that fortunately are gone for good.

Therefore I suggest to clean up the English message file, so that
other language maintainers do not have to do the unnecessary job like I 
just did (yes, the idea to grep the sources came to me only when I 
realized that I'm translating something too nasty).


Another message to remove is #1009 ('out of memory'), it is used only 
once and doing so is pretty senseless; either any memory allocation has 
to be checked, or check nothing and rely on memory manager to throw a 
runtime error, latter being the case.


Regards,
Sergei
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] SetString difference between Ansistring and UnicodeString

2009-10-07 Thread Sergei Gorelkin

Vincent Snijders wrote:



Shall I create a bug report?


Yes, please do so.

Sergei

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] fp IDE with libgdb

2009-10-07 Thread Felipe Monteiro de Carvalho
On Mon, Oct 5, 2009 at 10:27 AM, Mark Morgan Lloyd
 wrote:
> Linking testgdb
> /usr/local/lib/fpc/2.2.4/units/powerpc-linux/gdbint/gdbint.o: In function
> `GDBINT_INITLIBGDB':
> gdbint.pp:(.text+0x1a60): undefined reference to `error_init'
> libgdb.a(xml-support.o): In function `gdb_xml_use_dtd':
> /usr/local/src/fpc/libgdb/gdb-6.7.1/gdb/xml-support.c:522: undefined
> reference to `XML_SetParamEntityParsing'
> /usr/local/src/fpc/libgdb/gdb-6.7.1/gdb/xml-support.c:524: undefined
> reference to `XML_SetExternalEntityRefHandler'
> /usr/local/src/fpc/libgdb/gdb-6.7.1/gdb/xml-support.c:528: undefined
> reference to `XML_UseForeignDTD'

If libgdb wants more functions then just link more libraries to get
the necessary functions until it is happy.

Find out which library offers the routines it wants and link them to
your application too. I would guess it wants libxml, so something like
{$linklib xml} or {$linklib libxml)

-- 
Felipe Monteiro de Carvalho
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] SetString difference between Ansistring and UnicodeString

2009-10-07 Thread Thaddy

About the naughty naughts:
This is also the cause of many problems and the main cause of the ssl 
certificate hack:

"www.paypal.com\0filtyhacker.cr"
see ASN.1 and X509. PASCAL strings (with length before string) are for 
good reason part of many a specification... C strings are convienient, 
but many times declassified for real life work.
Only because of that it is important the real specs should be adhered 
to. (If only because it means PASCAL and derivatives have a real and 
mayor contribution to real life in programming ;) )

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] SetString difference between Ansistring and UnicodeString

2009-10-07 Thread Vincent Snijders

Sergei Gorelkin schreef:

Vincent Snijders wrote:

Vincent Snijders schreef:

While running valgrind on fpcdoc, I got a warning in


Maybe you are interested in the valgind output. See attachment.

That check should be removed altogether, in both WideString and 
UnicodeString routines.
I just checked with Delphi, it allows setstring(widestring) with data 
containing #0 in the middle. So having a check is Delphi-uncompatible, 
and also causes a performance penalty.




Shall I create a bug report?

Vincent
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Errors using generics - what is wrong?

2009-10-07 Thread Tomas Hajny
On Wed, October 7, 2009 11:27, Micha Nelissen wrote:
> Žilvinas Ledas wrote:
>> Thanks, it works with named type.
>> Is using not named specializations is some kind of "not implemented yet"
>> part? :)
>
> No it's a design choice to more easily reuse separate (but equal)
> specializations.

Well, the internal error is in any case a bug, so if this appears also
with the latest (trunk) version, a bug report would be useful.

Tomas


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Errors using generics - what is wrong?

2009-10-07 Thread Micha Nelissen

Žilvinas Ledas wrote:

Thanks, it works with named type.
Is using not named specializations is some kind of "not implemented yet" 
part? :)


No it's a design choice to more easily reuse separate (but equal) 
specializations.


Micha
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel