A.Glenn Mathewson, a building inspector in Westminster, Colo., responds:Your memory serves you well, except that the required distance varies for different conditions. IRC Section R317.1 (the 2009 edition, which I administer) lists seven circumstances where protection from decay is required, and four of them could apply to your description of wood attached to concrete or masonry, depending on the details. In general, the code provisions deal not only with the wetting potential of the wood, but how easily it can dry. In some conditions, being "inside" actually creates more decay potential than being "outside," where wood might be better able to dry out. An interior condition where wood stays damp is a great recipe for decay.
The code also addresses the type of wood you can use. In most cases, either pressure-treated lumber or naturally durable lumber (defined by the IRC as the heartwood of redwood, cedar, black locust, and black walnut) is acceptable. In some cases, separating wood from concrete with a water-impervious membrane or vapor retarder is all that's required. Let's look at the four relevant code provisions one at a time.
Sills near grade. Item #2 under R317.1 refers to wood framing members that rest on concrete or masonry exterior foundation walls and are less than 8 inches from the exposed ground. The problem is capillary action, which can cause an exterior concrete foundation wall in contact with the saturated ground to pull water up through it and wet the sill plate. Under this provision, it wouldn't matter if the exterior foundation wall were under a roof in a presumably "dry" condition.
Sills on slabs. Item #3 addresses sill plates and sleepers attached to horizontal concrete slabs on grade, and doesn't differentiate between interior and exterior conditions. This provision is intended to protect against the movement of water vapor from the ground through the concrete into the wood, which will not be able to dry because it's fastened directly to the slab and thus traps the moisture. In this case, PT or naturally durable wood is required unless the wood is separated from the concrete with an "impervious moisture barrier." The use of a moisture barrier beneath the slab, however, is not an alternative to these provisions, as any moisture already in the new concrete or other moisture that may be introduced would not be isolated from the wood. This condition would apply, for example, in the case of a porch roof framed on top of a concrete patio slab in contact with the ground.
Beam pockets. Item #4 requires a wood girder that enters exterior masonry or concrete walls to be decay-resistant unless a clearance of 1/2 inch is provided at the end, sides, and top of the beam. A common example is a roof support in a concrete beam pocket or one that extends through an exterior masonry veneer wall. If the wall is exposed to precipitation, over time the moisture absorbed by the concrete or masonry may cause the wood to rot - unless that 1/2 inch of space is maintained. Typically, though, the space is closed up for aesthetic reasons, so decay-resistant lumber is used.
Furring strips. Item #7 applies to wood furring or framing attached to the inside of concrete and masonry walls that are below grade. The heavy-wetting and slow-drying potential on the outside of the wall can cause water absorption and vapor release on the inside. Thus furring strips must either be separated from the wall with an "approved vapor retarder" or be made from decay-resistant wood. Furring attached to an above-grade exterior wall would not be subject to this provision.
I hope this overview is helpful, but keep in mind it's only my interpretation of a code section that's relatively difficult to follow. That's why, when making assessments, I try to stick to the intent of the code language - thus my explanations of the "science" behind the words. Unfortunately, the cumbersome list of conditions under R317.1 are likely to be interpreted differently depending on who reads it. As always when dealing with fuzzy code language, it's best to consult your local building official before moving forward with a questionable installation.