In my opinion, putting a normal flashlight mounted with a bracket on the gun is a poor idea. First, the flashlight isn't really made to stand up to the shock from heavy recoil like a true gun mounted light is. Plus it's bigger and bulkier.
I have the Streamlight TLR-1 LED gun mounted light and I love it. Others here have it too and they like it. It can be had for about $100 most places. Benefits of the light is with the LED you get about 2.5 X more battery life than you will with a normal light. Run time is about 2.5 hours, and it puts out at max 80 lumens. The LED is naturally resistant to shock so it is perfectly suited for mounting on a gun.
Streamlight also sells the M3 light which is a good light. But you get shorter run time, the light gets hotter, and it's prone to the bulb burning out compared to an LED light. It can be had for around $100 I believe also.
Otherwise they have the XML light which is smaller, and will fit the sub compact XD and other small guns with light rails. But it only puts out about 50 lumen, and the replacement bulb for it is pricey.
Follow this link, on page 2 I have pictures of my light in use.
XD rail light