From: slade_rich Date: Mon, 2 Aug 2004 23:52:26 +0000 (+0000) Subject: Disabled "WARNING: function 'main' undefined" when -S option is used. X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=032cd275265e6d0d6bfd72fbe83b3c893c2ab332;p=fw%2Fsdcc Disabled "WARNING: function 'main' undefined" when -S option is used. git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3416 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/pic/glue.c b/src/pic/glue.c index 777e966b..e6f61ca5 100644 --- a/src/pic/glue.c +++ b/src/pic/glue.c @@ -560,7 +560,8 @@ pic14createInterruptVect (FILE * vFile) /* only if the main function exists */ if (!(mainf = findSymWithLevel (SymbolTab, mainf))) { - if (!options.cc_only) + struct options *op = &options; + if (!(op->cc_only || noAssemble)) // werror (E_NO_MAIN); fprintf(stderr,"WARNING: function 'main' undefined\n"); return; @@ -570,7 +571,7 @@ pic14createInterruptVect (FILE * vFile) if (!IFFUNC_HASBODY(mainf->type)) { /* if ! compile only then main function should be present */ - if (!options.cc_only) + if (!(options.cc_only || noAssemble)) // werror (E_NO_MAIN); fprintf(stderr,"WARNING: function 'main' undefined\n"); return;