Chyby v knihovne?

Stanislav Meduna stano na trillian.eunet.sk
Pondělí Červenec 19 23:30:09 CEST 1999


On 19 Jul 1999 19:16:14 +0200, Pavel Kankovsky wrote:

:> Uz jsem to vyresil, nesmim pouzivat volbu kompilatoru -pedantic.

: Hmm...to neni uplne koser, kdyz systemova knihovna neni ANSI-compliant.

Nebude to (aj) tymto?

3.11.   I get some errors with `gcc -ansi'. Isn't glibc ANSI compatible?

{AJ} The GNU C library is compatible with the ANSI/ISO C standard.  If
you're using `gcc -ansi', the glibc includes which are specified in the
standard follow the standard.  The ANSI/ISO C standard defines what has to be
in the include files - and also states that nothing else should be in the
include files (btw. you can still enable additional standards with feature
flags).

The GNU C library is conforming to ANSI/ISO C - if and only if you're only
using the headers and library functions defined in the standard.


Mam dojem, ze na mailing liste ku glibc sa nieco
podobneho uz preberalo tiez.

V kazdom pripade "program" typu

#include <math.h>

main()
{
  float a = log(10);
}

skompiluje tak s -ansi, ako aj s -pedantic bez problemov.


:> Ale, ze je to radost, kdyz se meni C knihovny a kompilator kazdeho pul
:> roku!

: A polozme si otazku, kdo je na tom pocitaci vymenil? ;)

:-)))

Zdravi
-- 
				Stano



Další informace o konferenci Linux