MAJ terminée. Nous sommes passés en version 14.6.2 . Pour consulter les "releases notes" associées c'est ici :

https://about.gitlab.com/releases/2022/01/11/security-release-gitlab-14-6-2-released/
https://about.gitlab.com/releases/2022/01/04/gitlab-14-6-1-released/

Commit 054c8430 authored by Jens Gustedt's avatar Jens Gustedt
Browse files

simplify P99_MACRO_PVAR and add some documentation for it

parent 675d5e83
...@@ -1235,18 +1235,50 @@ __typeof__(EXP) __VA_ARGS__ P99_PASTE2(p00_macro_var_, NAME) = (EXP), \ ...@@ -1235,18 +1235,50 @@ __typeof__(EXP) __VA_ARGS__ P99_PASTE2(p00_macro_var_, NAME) = (EXP), \
NAME = P99_PASTE2(p00_macro_var_, NAME) NAME = P99_PASTE2(p00_macro_var_, NAME)
#define P00_MACRO_PVAR(NAME, EXP, ...) \ #define P00_MACRO_PVAR(NAME, EXP, ...) \
__typeof__(__typeof__(*(EXP)) __VA_ARGS__*) P99_PASTE2(p00_macro_var_, NAME) = (EXP), \ __typeof__(*(EXP)) __VA_ARGS__* P99_PASTE2(p00_macro_var_, NAME) = (EXP), \
NAME = P99_PASTE2(p00_macro_var_, NAME) * NAME = P99_PASTE2(p00_macro_var_, NAME)
#ifdef DOXYGEN #ifdef DOXYGEN
/** /**
** @brief Define a variable with @a NAME that has the type and value of ** @brief Define a variable with @a NAME that has the type and value of
** @a EXPR. If @a QUAL is given it must be a qualifier list that is ** @a EXPR.
** added to the resulting type. **
** If @a QUAL is given it must be a qualifier list that is added to
** the resulting type.
**
** @remark Other than just redeclaring @a NAME this macro is safe
** even if @a EXPR contains the evaluation of a variable of the same
** name @a NAME.
**
** This is achieved by declaring two variables, one with a dummy name
** that receives @a EXPR as an initializer (so there can't be a name
** conflict), and then @a NAME that is initialized with the
** first. Any normal optimizer should optimize that auxiliary
** variable out.
**/ **/
P00_DOCUMENT_IDENTIFIER_ARGUMENT(P99_MACRO_VAR, 0) P00_DOCUMENT_IDENTIFIER_ARGUMENT(P99_MACRO_VAR, 0)
P00_DOCUMENT_PERMITTED_ARGUMENT(P99_MACRO_VAR, 1) P00_DOCUMENT_PERMITTED_ARGUMENT(P99_MACRO_VAR, 1)
#define P99_MACRO_VAR(NAME, EXPR, QUAL) # define P99_MACRO_VAR(NAME, EXPR, QUAL)
/**
** @brief Define a variable with @a NAME that has the type and value of
** @a EXPR, where @a EXPR is of a pointer type.
**
** If @a QUAL is given it must be a qualifier list that is
** added to the type @a EXPR is pointing to.
**
** @remark Other than just redeclaring @a NAME this macro is safe
** even if @a EXPR contains the evaluation of a variable of the same
** name @a NAME.
**
** This is achieved by declaring two variables, one with a dummy name
** that receives @a EXPR as an initializer (so there can't be a name
** conflict), and then @a NAME that is initialized with the
** first. Any normal optimizer should optimize that auxiliary
** variable out.
**/
P00_DOCUMENT_IDENTIFIER_ARGUMENT(P99_MACRO_PVAR, 0)
P00_DOCUMENT_PERMITTED_ARGUMENT(P99_MACRO_PVAR, 1)
# define P99_MACRO_PVAR(NAME, EXPR, QUAL)
#else #else
P00_DOCUMENT_IDENTIFIER_ARGUMENT(P99_MACRO_VAR, 0) P00_DOCUMENT_IDENTIFIER_ARGUMENT(P99_MACRO_VAR, 0)
P00_DOCUMENT_PERMITTED_ARGUMENT(P99_MACRO_VAR, 1) P00_DOCUMENT_PERMITTED_ARGUMENT(P99_MACRO_VAR, 1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment