From 334e4acd61605111712edefe874f98d030f0d25c Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Tue, 1 Jun 2010 11:12:14 +0200 Subject: Change warning to error for nowarn_bif_clash compiler directive --- lib/compiler/doc/src/compile.xml | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) (limited to 'lib/compiler/doc/src/compile.xml') diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml index 3a70f6277b..e1f24b602d 100644 --- a/lib/compiler/doc/src/compile.xml +++ b/lib/compiler/doc/src/compile.xml @@ -355,51 +355,34 @@ nowarn_bif_clash -

By default, the compiler will issue an error or warning - when replacing an auto-imported BIF. For local functions - having names clashing with an auto-imported BIF, the error - or warning is issued whenever it is called without using a - module prefix. For explicitly imported functions, the - error or warning will be issued as soon as it's imported - (regardless of calls). If the auto-imported BIF was present - before OTP R14A it will be a fatal error to override it, - otherwise only a warning will be issued.

+

This option is removed, it will generate a fatal error if used.

Beginning with R14A, the compiler no longer calls the auto-imported BIF if the name clashes with a local or explicitly imported function and a call without explicit module name is issued. Instead the local or imported - function is called. Use of nowarn_bif_clash makes a + function is called. Still accepting nowarn_bif_clash would makes a module calling functions clashing with autoimported BIFs compile with both the old and new compilers, but with - completely different semantics, why a warning is always - issued if any code uses this option.

+ completely different semantics, why the option was removed.

The use of this option has always been strongly discouraged. - From OTP R14A and forward it's also deprecated.

-

The only module who actually could have some legitimate use for - this option is the module erlang, which in - itself contains auto-imported functions, other modules - should never use it.

+ From OTP R14A and forward it's an error to use it.

To resolve BIF clashes, use explicit module names or the - {no_auto_import,[F/A]} directive.

-

nowarn_bif_clash will be removed in a future release.

+ {no_auto_import,[F/A]} compiler directive.

{nowarn_bif_clash, FAs} -

Turns off warnings as nowarn_bif_clash but only - for the mentioned local functions. FAs is a tuple - {Name,Arity} or a list of such tuples.

+

This option is removed, it will generate a fatal error if used.

+

The use of this option has always been strongly discouraged. - From OTP R14A and forward it's also deprecated and a warning will be issued - whenever it is used.

+ From OTP R14A and forward it's an error to use it.

To resolve BIF clashes, use explicit module names or the - {no_auto_import,[F/A]} directive instead.

-

nowarn_bif_clash will be removed in a future release.

+ {no_auto_import,[F/A]} compiler directive.

-- cgit v1.2.3