Bilal al-Absi (may Allah have mercy on him) said: When there was a death in his family, Sayyiduna Hudhayfah (may Allah be pleased with him) would not inform anyone of it, and he would say: "I fear that it would be na'y (announcing the death); I heard the Messenger of Allah (peace and blessings be upon him) forbid na'y."
This is also narrated from Ibn Mas'ud, Ibn Umar and Abu Sa'id (may Allah be pleased with them), and then from Alqamah, Ibn al-Musayyib, al-Rabi' bin Khuthaym and Ibrahim al-Nakha'i (may Allah have mercy on them). It has reached me that Malik bin Anas (may Allah have mercy on him) said: I do not like crying out about a man's death at the doors of the mosques; but if someone stood at the study circles in the mosques and informed the people of his death, there would be no harm in it.
It has been narrated to us from Sayyiduna Anas bin Malik (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) announced the death of Ja'far, Zayd and Ibn Rawahah (may Allah be pleased with them); and from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) announced the death of the Negus (al-Najashi); and from him, concerning the death of the person who used to sweep the mosque and was buried at night: "Why did you not inform me?" And in one narration: "What prevented you from letting me know?"
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 7179