|
View:
New views
11 Messages
—
Rating Filter:
Alert me
|
|
|
invalid use of non-lvalue array w/ GCC 3.3.5Hi,
I've encountered the following problem with GCC 3.3.5: cmdline.c:2242: invalid use of non-lvalue array cmdline.c:2242: invalid use of non-lvalue array gmake: *** [cmdline.c.o] Error 1 gmake: Leaving directory 'vbscan/build' the corresponding lines from cmdline.c: 2237: if (args_info->daemon_mode_counter && args_info->standalone_mode_counter) { 2238: error += check_modes( 2239: (int []){args_info->daemon_given, args_info->attach_given, -1}, 2240: (const char *[]){"--daemon", "--attach", 0}, 2241: (int []){args_info->engine_given, args_info->vdb_given, args_info->optional_given, args_info->quarantine_given, args_info->temp_gi 2242: (const char *[]){"--engine", "--vdb", "--optional", "--quarantine", "--temp", "--scanning", "--heuristics", "--memory", "--archive } I'm about to update GCC but there is no other way to solve this? -- Papp, Gyozo Virusbuster Kft _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: invalid use of non-lvalue array w/ GCC 3.0.4Hi,
> I've encountered the following problem with GCC 3.3.5: sorry, it is even worse for me, we still use 3.0.4 shame on me! btw, my question is still open. > cmdline.c:2242: invalid use of non-lvalue array > cmdline.c:2242: invalid use of non-lvalue array > gmake: *** [cmdline.c.o] Error 1 > gmake: Leaving directory 'vbscan/build' > > the corresponding lines from cmdline.c: > > 2237: if (args_info->daemon_mode_counter && > args_info->standalone_mode_counter) { > 2238: error += check_modes( > 2239: (int []){args_info->daemon_given, args_info->attach_given, -1}, > 2240: (const char *[]){"--daemon", "--attach", 0}, > 2241: (int []){args_info->engine_given, args_info->vdb_given, > args_info->optional_given, args_info->quarantine_given, args_info->temp_gi > 2242: (const char *[]){"--engine", "--vdb", "--optional", > "--quarantine", "--temp", "--scanning", "--heuristics", "--memory", > "--archive > } > _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: invalid use of non-lvalue array w/ GCC 3.0.4Papp Gyozo (VBuster) wrote:
> Hi, > >> I've encountered the following problem with GCC 3.3.5: > > sorry, it is even worse for me, we still use 3.0.4 shame on me! > btw, my question is still open. > >> cmdline.c:2242: invalid use of non-lvalue array >> cmdline.c:2242: invalid use of non-lvalue array >> gmake: *** [cmdline.c.o] Error 1 >> gmake: Leaving directory 'vbscan/build' >> >> the corresponding lines from cmdline.c: >> >> 2237: if (args_info->daemon_mode_counter && >> args_info->standalone_mode_counter) { >> 2238: error += check_modes( >> 2239: (int []){args_info->daemon_given, args_info->attach_given, -1}, >> 2240: (const char *[]){"--daemon", "--attach", 0}, >> 2241: (int []){args_info->engine_given, args_info->vdb_given, >> args_info->optional_given, args_info->quarantine_given, args_info->temp_gi >> 2242: (const char *[]){"--engine", "--vdb", "--optional", >> "--quarantine", "--temp", "--scanning", "--heuristics", "--memory", >> "--archive >> } Hi can you try to solve the problem manually, so that I can rewrite the generation code accordingly? Probably those arrays should be declared explicitly, but you should try until you don't get errors anymore, since I don't have that version of the compiler... thanks hope to hear from you soon cheers Lorenzo -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com http://www.myspace.com/supertrouperabba BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com http://www.gnu.org/software/src-highlite http://www.gnu.org/software/gengetopt http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: invalid use of non-lvalue array w/ GCC 3.0.4On Fri, 2008-03-28 at 17:56 +0100, Lorenzo Bettini wrote:
> >> "--quarantine", "--temp", "--scanning", "--heuristics", "--memory", > >> "--archive > >> } Is there actually no ending " after "--archive , or did my mail client bugger it? Cheers, --Tim _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: invalid use of non-lvalue array w/ GCC 3.0.4> >> cmdline.c:2242: invalid use of non-lvalue array
> >> cmdline.c:2242: invalid use of non-lvalue array > >> gmake: *** [cmdline.c.o] Error 1 > >> gmake: Leaving directory 'vbscan/build' > >> > >> the corresponding lines from cmdline.c: > >> > >> 2237: if (args_info->daemon_mode_counter && > >> args_info->standalone_mode_counter) { > >> 2238: error += check_modes( > >> 2239: (int []){args_info->daemon_given, args_info->attach_given, > -1}, > >> 2240: (const char *[]){"--daemon", "--attach", 0}, > can you try to solve the problem manually, so that I can rewrite the > generation code accordingly? Probably those arrays should be declared > explicitly, but you should try until you don't get errors anymore, since Yes, sure I'll give it a try as soon as I have time to play with it. I was wondering if there was any barrier to do it other way (explicit decl as you suggested) and beside this hoping someone pointed me out what this error message complaining about specifically, because first I couldn't see what left-value it was speaking about... _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: invalid use of non-lvalue array w/ GCC 3.0.4> > >> "--quarantine", "--temp", "--scanning", "--heuristics", "--memory",
> > >> "--archive > > >> } > > Is there actually no ending " after "--archive , or did my mail client > bugger it? don't worry! It was me who forgot to copy the whole line from the stderr. no closing " in the original message either. _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: invalid use of non-lvalue array w/ GCC 3.0.4Papp Gyozo (VBuster) wrote:
>>>> cmdline.c:2242: invalid use of non-lvalue array >>>> cmdline.c:2242: invalid use of non-lvalue array >>>> gmake: *** [cmdline.c.o] Error 1 >>>> gmake: Leaving directory 'vbscan/build' >>>> >>>> the corresponding lines from cmdline.c: >>>> >>>> 2237: if (args_info->daemon_mode_counter && >>>> args_info->standalone_mode_counter) { >>>> 2238: error += check_modes( >>>> 2239: (int []){args_info->daemon_given, args_info->attach_given, >> -1}, >>>> 2240: (const char *[]){"--daemon", "--attach", 0}, > > >> can you try to solve the problem manually, so that I can rewrite the >> generation code accordingly? Probably those arrays should be declared >> explicitly, but you should try until you don't get errors anymore, since > > Yes, sure I'll give it a try as soon as I have time to play with it. I was wondering if there was any barrier to do it other way (explicit decl as you suggested) and beside this hoping someone pointed me out what this error message complaining about specifically, because first I couldn't see what left-value it was speaking about... yes I could generate explicit declaration but I'd want to be sure whether this solves the problem, because this would require some work in the code generation :-) as for the error, I can't see the l-value either, so it looks like a bug in the compiler... :-D cheers Lorenzo -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com http://www.myspace.com/supertrouperabba BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com http://www.gnu.org/software/src-highlite http://www.gnu.org/software/gengetopt http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: invalid use of non-lvalue array w/ GCC 3.0.4> Papp Gyozo (VBuster) wrote:
> >>>> cmdline.c:2242: invalid use of non-lvalue array > >>>> cmdline.c:2242: invalid use of non-lvalue array > >>>> 2237: if (args_info->daemon_mode_counter && > >>>> args_info->standalone_mode_counter) { > >>>> 2238: error += check_modes( > >>>> 2239: (int []){args_info->daemon_given, args_info->attach_given, > >> -1}, > >>>> 2240: (const char *[]){"--daemon", "--attach", 0}, > yes I could generate explicit declaration but I'd want to be sure > whether this solves the problem, because this would require some work in Yes, it solved the problem. I manually edited the generated source (see the diff for details) and reran GCC once more. Now it compiled the source even with no warning. > as for the error, I can't see the l-value either, so it looks like a bug > in the compiler... :-D I still don't know. The first not affected GCC version I found is 3.1. 3.0.4 seems buggy or rather I don't know something... --- cmdline.c.orig 2008-04-04 16:29:41.000000000 +0200 +++ cmdline.c 2008-04-04 16:43:57.000000000 +0200 @@ -2235,11 +2235,12 @@ local_args_info.terse_given = 0; if (args_info->daemon_mode_counter && args_info->standalone_mode_counter) { - error += check_modes( - (int []){args_info->daemon_given, args_info->attach_given, -1}, - (const char *[]){"--daemon", "--attach", 0}, - (int []){args_info->engine_given, args_info->vdb_given, args_info->optional_given, args_info->quarantine_given, args_info->temp_given, args_info->scanning_given, args_info->heuristics_given, args_info->memory_given, args_info->archive_max_size_given, args_info->archive_max_ratio_given, args_info->sfx_given, args_info->autoscan_given, args_info->thread_given, args_info->remove_macro_given, args_info->shared_mem_given, args_info->synchronization_given, -1}, - (const char *[]){"--engine", "--vdb", "--optional", "--quarantine", "--temp", "--scanning", "--heuristics", "--memory", "--archive-max-size", "--archive-max-ratio", "--sfx", "--autoscan", "--thread", "--remove-macro", "--shared-mem", "--synchronization", 0}); + int i1[] = {args_info->daemon_given, args_info->attach_given, -1}; + const char * s1[] = {"--daemon", "--attach", 0}; + int i2[] = {args_info->engine_given, args_info->vdb_given, args_info->optional_given, args_info->quarantine_given, args_info->temp_given, args_info->scanning_given, args_info->heuristics_given, args_info->memory_given, args_info->archive_max_size_given, args_info->archive_max_ratio_given, args_info->sfx_given, args_info->autoscan_given, args_info->thread_given, args_info->remove_macro_given, args_info->shared_mem_given, args_info->synchronization_given, -1}; + const char * s2[] = {"--engine", "--vdb", "--optional", "--quarantine", "--temp", "--scanning", "--heuristics", "--memory", "--archive-max-size", "--archive-max-ratio", "--sfx", "--autoscan", "--thread", "--remove-macro", "--shared-mem", "--synchronization", 0}; + + error += check_modes( i1, s1, i1, s2); } if (check_required) _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: invalid use of non-lvalue array w/ GCC 3.0.4Papp Gyozo (VBuster) wrote:
>> Papp Gyozo (VBuster) wrote: >>>>>> cmdline.c:2242: invalid use of non-lvalue array >>>>>> cmdline.c:2242: invalid use of non-lvalue array >>>>>> 2237: if (args_info->daemon_mode_counter && >>>>>> args_info->standalone_mode_counter) { >>>>>> 2238: error += check_modes( >>>>>> 2239: (int []){args_info->daemon_given, args_info->attach_given, >>>> -1}, >>>>>> 2240: (const char *[]){"--daemon", "--attach", 0}, > >> yes I could generate explicit declaration but I'd want to be sure >> whether this solves the problem, because this would require some work in > > Yes, it solved the problem. I manually edited the generated source (see the diff for details) and reran GCC once more. Now it compiled the source even with no warning. > >> as for the error, I can't see the l-value either, so it looks like a bug >> in the compiler... :-D > > I still don't know. The first not affected GCC version I found is 3.1. 3.0.4 seems buggy or rather I don't know something... > Hi there this version should fix this problem http://gdn.dsi.unifi.it/~bettini/gengetopt-2.22.1.tar.gz please let me know cheers Lorenzo -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com http://www.myspace.com/supertrouperabba BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com http://www.gnu.org/software/src-highlite http://www.gnu.org/software/gengetopt http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: invalid use of non-lvalue array w/ GCC 3.0.4Hi there
> this version should fix this problem > http://gdn.dsi.unifi.it/~bettini/gengetopt-2.22.1.tar.gz Nice, it rocks. Thanks a lot. _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: invalid use of non-lvalue array w/ GCC 3.0.4Papp Gyozo (VBuster) wrote:
> Hi there > >> this version should fix this problem >> http://gdn.dsi.unifi.it/~bettini/gengetopt-2.22.1.tar.gz > > Nice, it rocks. Thanks a lot. > glad to hear that :-) so I think I'm ready for this bug-fix release, and then I can start working on new features. cheers Lorenzo -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com http://www.myspace.com/supertrouperabba BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com http://www.gnu.org/software/src-highlite http://www.gnu.org/software/gengetopt http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
| Free embeddable forum powered by Nabble | Forum Help |