The present invention relates to compounds of general formula I,wherein the groups R, R1, R2, R3, m and n are as defined herein, which compounds have valuable pharmacological properties, in particular their ability to bind to the GPR40 receptor and modulate 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 type 2 diabetes. Furthermore, the invention relates to novel intermediates, useful for the synthesis of compounds of formula I.