Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Michael Van Canneyt
On Mon, 14 Jan 2008, Damien Gerard wrote: With fpc you can get myfile.pas(77,47) Warning: Constructing a class with abstract methods I just would like to know why it is allowed to build classes with abstract methods. AFIK it is different from other compilers and it is a bit strange

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Damien Gerard
On Jan 14, 2008, at 10:27 AM, Michael Van Canneyt wrote: On Mon, 14 Jan 2008, Damien Gerard wrote: With fpc you can get myfile.pas(77,47) Warning: Constructing a class with abstract methods I just would like to know why it is allowed to build classes with abstract methods. AFIK

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Michael Van Canneyt
On Mon, 14 Jan 2008, Damien Gerard wrote: On Jan 14, 2008, at 10:27 AM, Michael Van Canneyt wrote: On Mon, 14 Jan 2008, Damien Gerard wrote: With fpc you can get myfile.pas(77,47) Warning: Constructing a class with abstract methods I just would like to know why it is

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Damien Gerard
On Jan 14, 2008, at 11:00 AM, Graeme Geldenhuys wrote: On 14/01/2008, Michael Van Canneyt [EMAIL PROTECTED] wrote: Is there a way to abort the compilation in this cases instead of a warning ? Currently not. If you want to be that strict, then use Interfaces instead of Abstract

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Damien Gerard
On Jan 14, 2008, at 10:53 AM, Michael Van Canneyt wrote: On Mon, 14 Jan 2008, Damien Gerard wrote: On Jan 14, 2008, at 10:27 AM, Michael Van Canneyt wrote: On Mon, 14 Jan 2008, Damien Gerard wrote: With fpc you can get myfile.pas(77,47) Warning: Constructing a class with

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Graeme Geldenhuys
On 14/01/2008, Michael Van Canneyt [EMAIL PROTECTED] wrote: Is there a way to abort the compilation in this cases instead of a warning ? Currently not. If you want to be that strict, then use Interfaces instead of Abstract classes. - Regards, - Graeme -

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Matt Emson
Graeme Geldenhuys wrote: On 14/01/2008, Michael Van Canneyt [EMAIL PROTECTED] wrote: Is there a way to abort the compilation in this cases instead of a warning ? Currently not. If you want to be that strict, then use Interfaces instead of Abstract classes I always found (and

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Peter Vreman
It is allowed to create such instances: as long as you don't call any of the abstract methods, there will be no problem. Is there a way to abort the compilation in this cases instead of a warning ? Currently not. You can abort compilation in case of any warning with the -Sew option. The

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Michael Van Canneyt
On Mon, 14 Jan 2008, Peter Vreman wrote: It is allowed to create such instances: as long as you don't call any of the abstract methods, there will be no problem. Is there a way to abort the compilation in this cases instead of a warning ? Currently not. You can abort

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Jonas Maebe
On 14 Jan 2008, at 14:43, Damien Gerard wrote: On Jan 14, 2008, at 11:55 AM, Michael Van Canneyt wrote: The problem with this mechanism is that if you have another warning which occurs first, that will stop your compilation, you'll never get to the abstract warning... I agree. May be a

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Damien Gerard
On Jan 14, 2008, at 11:55 AM, Michael Van Canneyt wrote: On Mon, 14 Jan 2008, Peter Vreman wrote: It is allowed to create such instances: as long as you don't call any of the abstract methods, there will be no problem. Is there a way to abort the compilation in this cases instead of

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Damien Gerard
On Jan 14, 2008, at 2:59 PM, Jonas Maebe wrote: On 14 Jan 2008, at 14:43, Damien Gerard wrote: On Jan 14, 2008, at 11:55 AM, Michael Van Canneyt wrote: The problem with this mechanism is that if you have another warning which occurs first, that will stop your compilation, you'll never

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Peter Vreman
The problem with this mechanism is that if you have another warning which occurs first, that will stop your compilation, you'll never get to the abstract warning... I agree. May be a new option in a future release of fpc ? :) It would be nice to have a switch to do it. There is already a

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Jonas Maebe
On 14 Jan 2008, at 15:45, Peter Vreman wrote: There is already a feature request for the ability to turn off/on certain warnings in Mantis. Upgrading certain warnings (and hints/ notes) to errors is quite related. It should be quite doable for an outsider to implement this sort functionality,