let add_global_annotations annots =
  let globs = Globals.Annotations.get_all () in
  let globs = List.map (fun (g, _generated) -> g) globs in
  let rec do_g g =
    let (source,_) = Cil_datatype.Global_annotation.loc g in
    match g with
    | Daxiomatic (_ax_name, globs,_) -> do_globs globs 
    | Dvolatile _ ->
        (* nothing to do *) ()
    | Dfun_or_pred _ ->
        (* will be processed while translation is needed *) ()
    | Dtype _ ->
        (* will be processed while translation is needed *) ()
    | Dtype_annot (linfo,_) ->
        Wp_parameters.warning ~source
          "Type invariant not handled yet ('%s' ignored)"
          linfo.l_var_info.lv_name;
        ()
    | Dmodel_annot (linfo,_) ->
        Wp_parameters.warning ~source
          "Model fields not handled yet (model field '%s' ignored)"
          linfo.l_var_info.lv_name;
        ()
    | Dinvariant (linfo,_) ->
        Wp_parameters.warning ~source
          "Global invariant not handled yet ('%s' ignored)"
          linfo.l_var_info.lv_name;
        ()
    | Dlemma (name, is_axiom, labels, _, pred,_) ->
        if not is_axiom then
          Wp_parameters.warning ~once:true ~source
            "Proof obligation for property '%s' not generated." name ;
        WpStrategy.add_axiom annots name labels pred
  and do_globs globs = List.iter do_g globs in
    do_globs globs;
    annots