Originally posted by Blue actually the DA 40/2.8 only shares the optical arrangement of the M 40/2.8 pancake. Even the designer said they are different.
The M 40/2.8 Pancake was released in 1976 and the DA in 2004. Compare the shape and relative thickness. In addition, the DA 40 LTD received the Ghostless Coating on the rear element. While the DA may have its roots in the M and was influenced by it, it is different optically.
M 40/2.8
The DA 40/2.8
This is the Canon EF 40/2.8 STM Pancake In addition to what you wrote, I do not think the smc Pentax-M 40mm f/2.8 has an aspheric lens as the smc Pentax-DA 40 mm f/2.8 AL Limited and the XS version do.
Two other pancakes:
This is the smc Pentax-FA 43mm f/1.9 AL Limited: 7 lenses in 6 groups
And this is the Voigtländer 40mm f/2 Ultron SL II: 6 lenses in 5 groups