Flat roofs that do not drain over the roof edge and roofs that have parapet walls must utilize roof drains to get the water off the roof. Where you have roof drains you are also required to have overflow drains.
The 2006 International Residential Code specifies the size and locations for overflow drains on residential structures. Where you can drain over the wall, the overflow drain must be at least the same size as the regular drain and located no more than 2″ above the low point of the roof. Where you must drain through the wall with a scupper the overflow must be three times the required size of the roof drain and have a minimum height of 4″ and again be installed no more than 2″ above the roof low point.
While you must provide the overflow it can not be connected to a downspout. This is why you often see a scupper next to a downspout, that’s the overflow.