let get_all_annots cfg =
  let kf = Cil2cfg.cfg_kf cfg in
    Wp_parameters.feedback "get annotations in function '%a'"
      Kernel_function.pretty_name kf;
  let spec = get_spec kf in
    (* notice that spec.spec_requires are handled in add_spec_pre 
    * with the behaviors *)

    (* TODO : spec_variant + spec_terminates *)
  let _ = match spec.spec_variant with None -> ()
    | Some v ->  Wp_parameters.warning "ignored 'decrease' specification : %a@."
                   Cil.d_decreases v
  in
  let _ = match spec.spec_terminates with None -> ()
    | Some p ->  Wp_parameters.warning 
                   "ignored 'terminates' specification : %a@."
                   !Ast_printer.d_predicate_named  
                   (Logic_const.pred_of_id_pred p)
  in
  let rec get_named_bhv_annots lb = match lb with [] -> []
    | b::tlb -> 
        if b.b_name = Macros.name_of_default_behavior 
        then (* do it later*) get_named_bhv_annots tlb
        else 
          let ab = get_bhv_annots (Some b) cfg in
          let atlb = get_named_bhv_annots tlb in
            ab::atlb
  in
  let def_bhv_annots = get_bhv_annots None cfg in
    (* do the default behavior even if it has no body in spec_behavior.
       This is useful to process the annotations inside a function
       even if there is no function spec *)

  let annots_fct = get_named_bhv_annots  spec.spec_behavior in
    def_bhv_annots::annots_fct