Changeset 4538 for trunk/compiler

Show
Ignore:
Timestamp:
10/25/08 12:02:58 (3 months ago)
Author:
pmoura
Message:

Corrected a bug where portability warnings would be reported when the "report" compiler option is turned off. Corrected a bug where portability warnings would not increment the warnings counter.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/compiler/logtalk.pl

    r4537 r4538  
    53025302    '$lgt_ignore_pl_directive'(Dir),                    % defined in the Prolog config files 
    53035303    !, 
    5304     (   '$lgt_compiler_flag'(portability, warning) -> 
     5304    (   '$lgt_compiler_flag'(portability, warning), 
     5305        '$lgt_compiler_flag'(report, on) -> 
     5306        '$lgt_inc_compile_warnings_counter', 
    53055307        nl, write('%          WARNING!  Ignoring Prolog directive: '), writeq(Dir), 
    53065308        nl, '$lgt_report_compiler_error_line_number'(Line, Input) 
     
    53095311 
    53105312'$lgt_tr_directive'(Dir, Line, Input, _) :- 
    5311     '$lgt_rewrite_and_copy_pl_directive'(Dir, RWDir),   % defined in the Prolog config files 
     5313    '$lgt_rewrite_and_copy_pl_directive'(Dir, RWDir),       % defined in the Prolog config files 
    53125314    assertz('$lgt_pp_directive_'(RWDir)), 
    53135315    !, 
    5314     (   '$lgt_compiler_flag'(portability, warning) -> 
    5315         nl, write('%          WARNING!  Rewriting Prolog directive:         '), writeq(Dir), 
    5316         nl, write('%                    Copying resulting Prolog directive: '), writeq(RWDir), 
     5316    (   '$lgt_compiler_flag'(portability, warning), 
     5317        '$lgt_compiler_flag'(report, on) -> 
     5318        '$lgt_inc_compile_warnings_counter', 
     5319        nl, write('%          WARNING!  Rewriting and copying Prolog directive: '), writeq(Dir), 
    53175320        nl, '$lgt_report_compiler_error_line_number'(Line, Input) 
    53185321    ;   true 
     
    53225325    '$lgt_rewrite_and_recompile_pl_directive'(Dir, RWDir),  % defined in the Prolog config files 
    53235326    !, 
    5324     (   '$lgt_compiler_flag'(portability, warning) -> 
    5325         nl, write('%          WARNING!  Rewriting Prolog directive:             '), writeq(Dir), 
    5326         nl, write('%                    Recompiling resulting Prolog directive: '), writeq(RWDir), 
     5327    (   '$lgt_compiler_flag'(portability, warning), 
     5328        '$lgt_compiler_flag'(report, on) -> 
     5329        '$lgt_inc_compile_warnings_counter', 
     5330        nl, write('%          WARNING!  Rewriting and recompiling Prolog directive: '), writeq(Dir), 
    53275331        nl, '$lgt_report_compiler_error_line_number'(Line, Input) 
    53285332    ;   true 
    53295333    ), 
    5330     '$lgt_tr_directive'(RWDir, Line, Input, Output).    % try to translate the rewritten directive 
     5334    '$lgt_tr_directive'(RWDir, Line, Input, Output).        % try to translate the rewritten directive 
    53315335 
    53325336'$lgt_tr_directive'(Dir, _, _, _) :- 
     
    1067710681'$lgt_report_non_portable_calls' :- 
    1067810682    '$lgt_compiler_flag'(portability, warning), 
     10683    '$lgt_compiler_flag'(report, on), 
    1067910684    setof(Pred, '$lgt_non_portable_call'(Pred), Preds), 
    1068010685    '$lgt_inc_compile_warnings_counter', 
     
    1070610711'$lgt_report_non_portable_functions' :- 
    1070710712    '$lgt_compiler_flag'(portability, warning), 
     10713    '$lgt_compiler_flag'(report, on), 
    1070810714    setof(Functor/Arity, '$lgt_non_portable_function_'(Functor, Arity), Functions), 
    1070910715    '$lgt_inc_compile_warnings_counter',