This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Needed help on compiler option
- From: bhamidipati subrahmanyam <ramuec at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 17 May 2011 16:18:40 +0530
- Subject: Needed help on compiler option
Hi all,
Pls have a look at the following code snippet....
void test(int i)
{
??? printf("i:%d\n",i);
}
int main()
{
??? char arr[100];
??? arr[1] = 10;
??? test(arr[1]);
??? return 0;
}
Logically, this code is working. But this simple concept resembles a
real time problem,
where the compiler should generate a warning when there is a type mismatch.
Pls suggest a compiler flag (flag like -Wall which should be passed to
gcc) which should
give a warning when there a type mismatch in the arguments t functions.
Thanx,
Subrahmanyam.