U.S. consumer spending rose modestly in May and inflation cooled, pointing to a slow-but-steady economic expansion that could still lead the Federal Reserve to raise interest rates by the end of the year.

Consumer spending, which accounts for more than two-thirds of U.S. economic activity, rose 0.1 percent last month and consumer prices outside food and energy were up 1.4 percent from May 2016, the…