Dress codes are fast disappearing, but if you want to avoid looking like a tourist, then avoid white sneakers, baseball caps, tracksuit pants, shorts and flip-flops (except at the beach). Generally speaking, business casual dress code is sufficient in cities and in all but the most formal occasions.
Usual courtesy applies when entering churches, and although you may not be asked to leave, it is better to avoid short pants and halter tops.
Some restaurants will frown if you come in dressed for trekking but very few will insist upon a jacket and tie. You may be surprised by the number of French twenty-somethings who show up at a grungy bar in jacket and tie, even if obviously from a thrift-shop.
Beaches and swimming pools (in hotels) are used for getting a tan. Taking off your bra will not usually create a stir if you don't mind a bevy of oglers. Taking off the bottom part is reserved to designated nude beaches. People on beaches are usually not offended by a young boy or girl undressed. Most resort cities insist on your wearing a shirt when leaving the beach area. Many pools will not allow baggy or "board" swim trunks, insisting on snug fitting speedo type trunks.
Breastfeeding in public is very rare but nobody will mind if you do.