Here at The Motley Fool, we've long been big fans of long-term investing. We love to point out how many very wealthy people have gotten that way not by frantically trading in and out of stocks, but instead by simply hanging onto shares of strong companies for many years. Look at International Game Technology (NYSE:IGT), for example -- its stock has roughly quadrupled over the past decade. Genzyme (NASDAQ:GENZ) stock has increased in value more than fivefold over the same period.

But there's a problem lurking out there in long-term-land: underfunded pensions. According to an investment research report from UBS, nearly half of the S&P 500 component companies have underfunded pensions, some rather significantly. Ford (NYSE:F) faces a shortfall of $3.3 billion, while underfunding at Goodyear (NYSE:GT) amounts to $1.5 billion.

What does that really mean? Well, companies owe traditional pension benefits to many of their employees, so they set aside money in pension accounts to cover their future liability. Yet for many companies, the funds in the pension account aren't sufficient to meet their obligations, even taking into account their expected growth over time due to investments. So at some point, these firms are likely to have to dip into their earnings in order to pay promised benefits to retirees. That's not good news for shareholders.

In the public sector, state and city governments are often underfunding pension plans. That's causing reduction of services to citizens and threatening their solvency.

According to the report, many firms are sufficiently funded or better -- including, perhaps surprisingly, General Motors (NYSE:GM) and Eastman Kodak (NYSE:EK). Companies don't have to remain underfunded -- General Motors, for example, has only recently shifted into the overfunded category. That's in part due to its issuing debt, which can also be problematic for future earnings, if substantial sums are later devoted to paying down debt. (Check a company's balance sheet to see debt levels and the degree to which they've been growing.)

If you're worried about the funding status of a company pension, here are some tips on how to determine the funding status of a company.

Most of us shouldn't rely on having pensions anymore. Fortunately, we can still secure a comfy retirement. For detailed guidance on retirement planning, test-drive, for free, our Rule Your Retirement newsletter service. A free trial will give you full access to all past issues. It regularly offers recommendations of promising stocks and mutual funds, too.

Longtime Fool contributor Selena Maranjian does not own shares of any companies mentioned in this article. Try our investing newsletters free for 30 days. The Motley Fool is Fools writing for Fools.