a dealer can deny your warranty and you can fight it. but the cost can be prohibitive.
you often hear of dealers denying warranty work because of something you changed, like exhaust or intake. its really up to the dealer.
as to the ecu thing, i dont know about subaru, but supposedly GM has been pretty tough on folks getting their cars 'tuned'. especially the turbo diesel trucks, and also vettes. like all cars apparently a tune on a vette, especially an automatic makes the car run a lot better, but gm has supposedly stated they will deny warranty work if the ecu has been modified. and they can tell.
in the end its up to the dealer. from what i understand, the dealer gets paid for warranty work by the manufacturer, so its money in their pocket. which would lead me to believe that if you are getting charged for warranty work, the dealer is playing games and charging you more than they would get from the manufacturer or the manufacturer has taken a tough stance on warranty work, something GM has done because of their economic woes.
i wonder if cobb would chime in and tell us if Nissan can detect changes to the GTR ECU, which is one of cobb's target markets.