The present invention relates to compounds of general formula I,wherein the groups R, R1, R2, R3, m and n are defined herein, which have valuable pharmacological properties, including binding to the GPR40 receptor and modulating its activity. The compounds are suitable for treatment and prevention of diseases which can be influenced by this receptor, such as metabolic diseases, in particular diabetes type 2. Furthermore, the invention relates to novel intermediates, useful for the synthesis of compounds of formula I.