This paper deals with the cosmic-ray penetration into molecular clouds and
with the related gamma--ray emission. High energy cosmic rays interact with the
dense gas and produce neutral pions which in turn decay into two gamma rays.
This makes molecular clouds potential sources of gamma rays, especially if they
are located in the vicinity of a powerful accelerator that injects cosmic rays
in the interstellar medium. The amplitude and duration in time of the
cosmic--ray overdensity around a given source depend on how quickly cosmic rays
diffuse in the turbulent galactic magnetic field. For these reasons, gamma-ray
observations of molecular clouds can be used both to locate the sources of
cosmic rays and to constrain the properties of cosmic-ray diffusion in the
Galaxy.Comment: To appear in the proceedings of the San Cugat Forum on Astrophysics
2012, 27 pages, 10 figure