  We obtain asymptotic formulas for the sums $\sum_{n_1,\ldots,n_k\le x}
f((n_1,\ldots,n_k))$ and $ \sum_{n_1,\ldots,n_k\le x} f([n_1,\ldots,n_k])$
involving the gcd and lcm of the integers $n_1,\ldots,n_k$, where $f$ belongs
to certain classes of additive arithmetic functions. In particular, we consider
the generalized omega function $\Omega_{\ell}(n)= \sum_{p^\nu \mid\mid n}
\nu^{\ell}$ investigated by Duncan (1962) and Hassani (2018), and the functions
$A(n)=\sum_{p^\nu \mid\mid n} \nu p$, $A^*(n)= \sum_{p \mid n} p$,
$B(n)=A(n)-A^*(n)$ studied by Alladi and Erd\H{o}s (1977). As a key auxiliary
result we use an inclusion-exclusion-type identity.
