[Dune] [Dune-Commit] dune-common r6505 - trunk/m4

Christian Engwer christian.engwer at uni-muenster.de
Fri Sep 30 08:59:01 CEST 2011


Hi Oli,

do all compiler, which support __attribute__((deprecated)) also
__attribute__((deprecated))(msg) ?

I'm not sure!

I this case you will have to check for both feature independently and
also provide a fallback
DUNE_DEPRECATED_MSG="__attribute__((deprecated))"
in case the message does not work.

Christian

On Fri, Sep 30, 2011 at 07:52:01AM +0200, sander at dune-project.org wrote:
> Author: sander
> Date: 2011-09-30 07:52:00 +0200 (Fri, 30 Sep 2011)
> New Revision: 6505
> 
> Modified:
>    trunk/m4/dune_deprecated.m4
> Log:
> add support for a deprecation warning with an extra information message.  Patch by Andreas Lauser
> 
> Modified: trunk/m4/dune_deprecated.m4
> ===================================================================
> --- trunk/m4/dune_deprecated.m4	2011-09-23 13:21:40 UTC (rev 6504)
> +++ trunk/m4/dune_deprecated.m4	2011-09-30 05:52:00 UTC (rev 6505)
> @@ -14,13 +14,17 @@
>                      class t_peng { t_peng() {}; } DEP;
>                      void foo() DEP;
>                      void foo() {};],[],
> -				   [DUNE_DEPRECATED="__attribute__((deprecated))"
> -                    AC_MSG_RESULT(yes)],
> -				   [DUNE_DEPRECATED=""
> -                    AC_MSG_RESULT(no)])
> +                                  [DUNE_DEPRECATED="__attribute__((deprecated))"
> +                                   DUNE_DEPRECATED_MSG="__attribute__((deprecated(msg) ))"
> +                     AC_MSG_RESULT(yes)],
> +                                  [DUNE_DEPRECATED=""
> +                                   DUNE_DEPRECATED_MSG=""
> +                     AC_MSG_RESULT(no)])
>  
> -        AC_LANG_POP([C++])
> -
> +         AC_LANG_POP([C++])
> + 
>      AC_DEFINE_UNQUOTED(DUNE_DEPRECATED, $DUNE_DEPRECATED,
>                        [how to create a deprecation warning])
> +    AC_DEFINE_UNQUOTED(DUNE_DEPRECATED_MSG(msg), $DUNE_DEPRECATED_MSG,
> +                      [how to create a deprecation warning with an additional message])
>  ])
> 
> 
> _______________________________________________
> Dune-Commit mailing list
> Dune-Commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-commit
> 




More information about the Dune mailing list