From the 2000 IRC. (the version my municipality uses)
M2005.1 General. Water heaters shall be installed in accordance
with the manufacturer's installation instructions and the
requirements of this code. Water heaters installed in an attic
shall conform to the requirements of Section M1305.1.3. Gasfired
water heaters shall conform to the requirements in Chapter
- Domestic electricwater heaters shall conform toUL174
or UL 1453. Commercial electric water heaters shall conform
toUL1453. Oiled-firedwater heaters shall conform toUL732.
M2005.2 Prohibited locations. Fuel-fired water heaters shall
not be installed in a room used as a storage closet.Water heaters
located in a bedroom or bathroom shall be installed in a sealed
enclosure so that combustion air will not be taken from the living
space. Direct-vent water heaters are not required to be installed
within an enclosure.