I purchased the iPhone 2g the first month it came out and this past week it started not syncing. I've tried with Macs/PCs, itunes 8.1/8.2, different cables, DFU and restore modes. It'll receive charge but can't be recognized on any computer.
The Apple Store will always do a free diagnostic, regardless of if you have a warranty or not.
Take it in and let them look at it.
If they determine it's a physical problem, and you want it repaired, you'd have to pay for the repair. But like I said, no cost for them to look at it.
Just remember to book a Genius Bar appt. online before you go into the store.
Gotta appointment Monday morning, I'll let yall know how it goes. I really didn't want to get the 3GS, I am eligible for discounted pricing though. I was going to hold out for a better hardware update.