> 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
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gengetopt