Did Concern for Public Safety Justify Not Reading Miranda Rights ?

In New York v. Quarles, 467 U.S. 649, 81 L. Ed. 2d 550, 104 S. Ct. 2626 (1984), the arresting officers were flagged down by a woman claiming that she had been raped by a gun carrying man who had fled into a nearby supermarket. The police pursued the suspect through the supermarket before apprehending him. Upon frisking him, the officer discovered that the man was wearing an empty shoulder holster. The officer asked where the gun was and the suspect directed him to the supermarket carton where he had hidden it. The United States Supreme Court held that notwithstanding the fact that the suspect was in custody and had not been read his Miranda rights before being questioned, the question about the gun's whereabouts was permissible because concern for public safety must be paramount to adherence to the literal language of the prophylactic rules enunciated in Miranda.