Disabled "WARNING: function 'main' undefined" when -S option is used.
authorslade_rich <slade_rich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 2 Aug 2004 23:52:26 +0000 (23:52 +0000)
committerslade_rich <slade_rich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 2 Aug 2004 23:52:26 +0000 (23:52 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3416 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/pic/glue.c

index 777e966be8acd293ed637a621b15346007978170..e6f61ca51c4639cc2a7dba66bc388c7dfe28bdd6 100644 (file)
@@ -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;