Gravitational waves and gamma-ray bursts