]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
* doc/extend.texi (__builtin_alloca, __builtin_alloca_with_align):
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
12cc1225 12016-03-01 Marek Polacek <polacek@redhat.com>
2
3 PR c++/69795
4 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
5 any DECL.
6
8c38d887 72016-02-22 Martin Sebor <msebor@redhat.com>
8
9 PR middle-end/69780
10 * c-common.c (check_builtin_function_arguments): Validate and
11 reject invalid arguments to __builtin_alloca_with_align.
12
e53f41d5 132016-02-20 Mark Wielaard <mjw@redhat.com>
14
15 PR c/28901
16 * c.opt (Wunused-const-variable): Turn into Alias for...
17 (Wunused-const-variable=): New option.
18
9cce8384 192016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
20
21 PR c++/69865
22 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
23 here...
24 (c_common_init_options): ...to here.
25 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
26
563d5cb8 272016-02-19 Jakub Jelinek <jakub@redhat.com>
28
29 PR c++/69826
30 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
31 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
32 flag_preprocess_only.
33
7675e968 342016-02-16 Jakub Jelinek <jakub@redhat.com>
35
36 PR c/69835
37 * c.opt (Wnonnull-compare): Enable for -Wall.
38
77454e6e 392016-02-15 Jakub Jelinek <jakub@redhat.com>
40
41 PR c++/69797
42 * c-common.c (sync_resolve_size): Diagnose too few arguments
43 even when params is non-NULL empty vector.
44
600695e0 452016-02-08 Bernd Schmidt <bschmidt@redhat.com>
46
47 PR target/60410
48 * c.opt (fshort-double): Remove.
49
a7cc1f94 502016-02-05 Martin Sebor <msebor@redhat.com>
51
52 PR c++/69662
53 * c.opt (Warning options): Update -Wplacement-new to take
54 an optional argument.
55
6f13b088 562016-02-01 Jakub Jelinek <jakub@redhat.com>
57
58 PR preprocessor/69543
59 PR c/69558
60 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
61 instead of loc to control_warning_option.
62
948eee2f 632016-02-01 Nathan Sidwell <nathan@codesourcery.com>
64
65 * c.opt (fopenacc-dim=): New option.
66
5fa82c11 672016-01-27 Ryan Burn <contact@rnburn.com>
68
69 PR cilkplus/69267
70 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
71 gimplify_arg. Removed superfluous post_p argument.
72 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
73 superfluous post_p argument.
74 * c-gimplify.c (c_gimplify_expr): Likewise.
75
3752e5b1 762016-01-26 David Malcolm <dmalcolm@redhat.com>
77
78 PR other/69006
79 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
80 pp_newline_and_flush with pp_flush.
81
bbbbe8ab 822016-01-20 Martin Sebor <msebor@redhat.com>
83
84 PR c/69405
85 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
86 an incompatible argument when the argument isn't a valid tree node.
87
f6dfb86a 882016-01-18 Jason Merrill <jason@redhat.com>
89
90 PR c++/68767
91 * c-common.c (check_function_arguments_recurse): Fold the whole
92 COND_EXPR, not just the condition.
93
f672c103 942016-01-18 Tom de Vries <tom@codesourcery.com>
95
96 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
97 classify as loop clause.
98
c8ef893c 992016-01-15 Jakub Jelinek <jakub@redhat.com>
100
101 PR bootstrap/68271
102 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
103 C++ FE no longer has limit on number of pragmas.
104
1052015-01-14 Ryan Burn <contact@rnburn.com>
7d600da5 106
107 PR c++/69048
108 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
580357e7 109 to add missing cleanup point.
7d600da5 110
a7ed4583 1112016-01-14 David Malcolm <dmalcolm@redhat.com>
112
113 PR c++/68819
114 * c-indentation.c (get_visual_column): Add location_t param.
115 Handle the column number being zero by effectively disabling the
116 warning, with an "inform".
117 (should_warn_for_misleading_indentation): Add location_t argument
118 for all uses of get_visual_column.
119
b933e511 1202016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
121
122 PR c++/69029
123 * c-indentation.c (should_warn_for_misleading_indentation):
124 Don't warn about do-while statements.
125
517906ff 1262016-01-07 Martin Sebor <msebor@redhat.com>
127
128 PR c/68966
129 * c-common.c (sync_resolve_size): Reject first argument when it's
130 a pointer to _Bool.
131
d42aa619 1322016-01-05 David Malcolm <dmalcolm@redhat.com>
133
134 PR c/69122
135 * c-indentation.c (get_visual_column): Remove default argument.
136 (should_warn_for_misleading_indentation): For the multiline case,
137 update call to get_visual_column for next_stmt_exploc so that it
138 captures the location of the first non-whitespace character in the
139 relevant line. Don't issue warnings if there is non-whitespace
140 before the next statement.
141
f1717362 1422016-01-04 Jakub Jelinek <jakub@redhat.com>
143
144 Update copyright years.
145
c0bf500c 1462015-12-21 David Malcolm <dmalcolm@redhat.com>
147
148 * c-common.c (binary_op_error): Convert first param from
149 location_t to rich_location * and use it when emitting an error.
150 * c-common.h (binary_op_error): Convert first param from
151 location_t to rich_location *.
152
dbd79382 1532015-12-16 David Malcolm <dmalcolm@redhat.com>
154
155 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
156 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
157
c0998828 1582015-12-15 Ilya Verbin <ilya.verbin@intel.com>
159
160 * c-common.c (c_common_attribute_table): Handle "omp declare target
161 link" attribute.
162
7ca909c6 1632015-12-14 Jakub Jelinek <jakub@redhat.com>
164
165 PR c/68833
166 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
167
d9102cbe 1682014-12-12 Tobias Burnus <burnus@net-b.de>
169
170 PR fortran/68815
171 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
172 specifiers (%d, %i,%u and %c).
173
a515ebdf 1742015-12-10 David Malcolm <dmalcolm@redhat.com>
175
176 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
177
31ba81bd 1782015-12-08 Jakub Jelinek <jakub@redhat.com>
179
180 PR c/48088
181 PR c/68657
182 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
183 * c-pragma.c (handle_pragma_diagnostic): Adjust
184 control_warning_option caller.
185
d0f713f4 1862015-12-07 David Malcolm <dmalcolm@redhat.com>
187
188 * c-common.c (c_cpp_error): Update for change to
189 rich_location::set_range.
190
32d050b5 1912015-12-04 Paolo Bonzini <bonzini@gnu.org>
192
193 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
194 shifting 1 out of the sign bit.
195
1962015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
197
198 * c-common.c (c_common_attribute_table[]): Update max arguments
199 count for "simd" attribute.
200 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
201
6a8fbd7a 2022015-12-03 Jakub Jelinek <jakub@redhat.com>
203
204 PR preprocessor/57580
205 * c-ppoutput.c (print): Change printed field to bool.
206 Move src_file last for smaller padding.
207 (init_pp_output): Set print.printed to false instead of 0.
208 (scan_translation_unit): Fix up formatting. Set print.printed
209 to true after printing something other than newline.
210 (scan_translation_unit_trad): Set print.printed to true instead of 1.
211 (maybe_print_line_1): Set print.printed to false instead of 0.
212 (print_line_1): Likewise.
213 (do_line_change): Set print.printed to true instead of 1.
214 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
215 dump_macro): Set print.printed to false after printing newline.
216
da562e32 2172015-12-02 Jason Merrill <jason@redhat.com>
218
9c691dbd 219 * c-common.c (fold_for_warn): New.
220 (warn_logical_operator, warn_tautological_cmp)
221 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
222
da562e32 223 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
224 (c_fully_fold_internal, decl_constant_value_for_optimization):
225 Move to c/c-fold.c.
226 * c-common.h: Don't declare decl_constant_value_for_optimization.
227
89f16034 2282015-12-02 Joseph Myers <joseph@codesourcery.com>
229
230 PR c/68162
231 * c-common.h (c_build_qualified_type): Add extra default
232 arguments.
233
571b3486 2342015-12-01 Julian Brown <julian@codesourcery.com>
235 Cesar Philippidis <cesar@codesourcery.com>
236 James Norris <James_Norris@mentor.com>
237
238 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
239 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
240 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
241
ed92a461 2422015-11-30 Eric Botcazou <ebotcazou@adacore.com>
243
244 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
245 (decl_sloc_common): Delete and move bulk of processing to...
246 (decl_sloc): ...here.
247 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
248 (dump_ada_double_name): Remove S parameter and compute the suffix.
249 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
250 element type and deal with an anonymous one.
251 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
252 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
253 and remove reference to QUAL_UNION_TYPE.
254 (dump_nested_types): Make 2 passes on the fields and move bulk to...
255 (dump_nested_type): ...here. New function extracted from above.
256 Generate a full declaration for anonymous element type of arrays.
257 (print_ada_declaration): Really skip anonymous declarations. Remove
258 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
259 Clean up processing of declarations of array types and objects.
260 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
261 Remove obsolete code and tidy up.
262
c25b3e3f 2632015-11-29 Jan Hubicka <hubicka@ucw.cz>
264
265 PR c/67581
266 * c-common.c (handle_transparent_union_attribute): Update
267 also type variants.
268
d4e328e9 2692015-11-27 Martin Liska <mliska@suse.cz>
270
271 PR c++/68312
272 * array-notation-common.c (cilkplus_extract_an_triplets):
273 Release vector of vectors.
274 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
275
f63d9c4e 2762015-11-26 Eric Botcazou <ebotcazou@adacore.com>
277
278 PR c++/68527
279 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
280 (print_ada_struct_decl): Likewise.
281
8d63c601 2822015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
283
284 PR c++/68001
285 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
286 * cilk.c (recognize_spawn): Determine location in a more precise
287 way.
288
01f11119 2892015-11-19 Jason Merrill <jason@redhat.com>
290
291 * c-common.c (shorten_compare): But look through macros from
292 system headers.
293
2d3d3af7 2942015-11-18 Jason Merrill <jason@redhat.com>
295
296 * c-common.c (shorten_compare): Don't -Wtype-limits if the
297 non-constant operand comes from a macro.
298
7991eeee 2992015-11-17 Jason Merrill <jason@redhat.com>
300
301 PR bootstrap/68346
302 * c-common.c (warn_tautological_cmp): Fold before checking for
303 constants.
304
73f67931 3052015-11-16 Marek Polacek <polacek@redhat.com>
306
307 PR c++/68362
308 * c-common.c (check_case_bounds): Fold low and high cases.
309
8e539fdc 3102015-11-16 Marek Polacek <polacek@redhat.com>
311
312 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
313 * c-common.c (c_common_get_alias_set): Likewise.
314 (handle_visibility_attribute): Likewise.
315
c58a4cfd 3162015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
317
318 * c-common.c (handle_simd_attribute): New.
319 (struct attribute_spec): Add entry for "simd".
320 (handle_simd_attribute): New.
321
bb036391 3222015-11-13 Kai Tietz <ktietz70@googlemail.com>
323
324 * c-lex.c (interpret_float): Use fold_convert.
325
a96cefb2 3262015-11-13 David Malcolm <dmalcolm@redhat.com>
327
328 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
329 and store it on the result.
330 * c-opts.c (c_common_init_options): Set
331 global_dc->colorize_source_p.
332
2fc5e987 3332015-11-12 James Norris <jnorris@codesourcery.com>
334 Joseph Myers <joseph@codesourcery.com>
335
336 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
337 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
338 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
339 PRAGMA_OACC_CLAUSE_LINK.
340
81b1b2a8 3412015-11-11 Marek Polacek <polacek@redhat.com>
342
343 PR c/68107
344 PR c++/68266
345 * c-common.c (valid_array_size_p): New function.
346 * c-common.h (valid_array_size_p): Declare.
347
4f3707ca 3482015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
349
350 PR bootstrap/68271
351 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
352
6e803544 3532015-11-11 Andrew MacLeod <amacleod@redhat.com>
354
355 * array-notation-common.c: Remove unused header files.
356 * c-ada-spec.c: Likewise.
357 * c-cilkplus.c: Likewise.
358 * c-common.c: Likewise.
359 * c-cppbuiltin.c: Likewise.
360 * c-dump.c: Likewise.
361 * c-format.c: Likewise.
362 * c-gimplify.c: Likewise.
363 * c-indentation.c: Likewise.
364 * c-lex.c: Likewise.
365 * c-omp.c: Likewise.
366 * c-opts.c: Likewise.
367 * c-pch.c: Likewise.
368 * c-ppoutput.c: Likewise.
369 * c-pragma.c: Likewise.
370 * c-pretty-print.c: Likewise.
371 * c-semantics.c: Likewise.
372 * c-ubsan.c: Likewise.
373 * cilk.c: Likewise.
374 * stub-objc.c: Likewise.
375
a1b7fe4b 3762015-11-09 Thomas Schwinge <thomas@codesourcery.com>
377 Cesar Philippidis <cesar@codesourcery.com>
378 James Norris <jnorris@codesourcery.com>
379 Julian Brown <julian@codesourcery.com>
380 Nathan Sidwell <nathan@codesourcery.com>
381
382 * c-pragma.c (oacc_pragmas): Add "routine".
383 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
384
292237f3 3852015-11-08 Eric Botcazou <ebotcazou@adacore.com>
386
387 * c-common.c (c_common_attributes): Add scalar_storage_order.
388 (handle_scalar_storage_order_attribute): New function.
389 * c-pragma.c (global_sso): New variable.
390 (maybe_apply_pragma_scalar_storage_order): New function.
391 (handle_pragma_scalar_storage_order): Likewise.
392 (init_pragma): Register scalar_storage_order.
393 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
394 * c.opt (Wscalar-storage-order): New warning.
395 (fsso-struct=): New option.
396
b4a4c5fa 3972015-11-08 Martin Sebor <msebor@redhat.com>
398
399 * c.opt (Wplacement-new): Add a period to the end of a sentence.
400
ac677063 4012015-11-07 Richard Sandiford <richard.sandiford@arm.com>
402
403 * c-common.c: Don't undef DEF_BUILTIN.
404
f0479000 4052015-11-06 David Malcolm <dmalcolm@redhat.com>
406
407 * c-common.c (c_cpp_error): Convert parameter from location_t to
408 rich_location *. Eliminate the "column_override" parameter and
409 the call to diagnostic_override_column.
410 Update the "done_lexing" clause to set range 0
411 on the rich_location, rather than overwriting a location_t.
412 * c-common.h (c_cpp_error): Convert parameter from location_t to
413 rich_location *. Eliminate the "column_override" parameter.
414
ef014f95 4152015-11-05 Cesar Philippidis <cesar@codesourcery.com>
416 Thomas Schwinge <thomas@codesourcery.com>
417 James Norris <jnorris@codesourcery.com>
418
419 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
420 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
421 clauses with parallel and kernels and loops.
422 * c-pragma.h (enum pragma_omp_clause): Add entries for
423 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
424 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
425 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
426 INDEPENDENT,SEQ}.
427 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
428
e520488c 4292015-11-05 Martin Sebor <msebor@redhat.com>
430
431 PR c++/67942
432 * c.opt (-Wplacement-new): New option.
433
9561765e 4342015-11-05 Jakub Jelinek <jakub@redhat.com>
435
436 * c-common.h (c_finish_omp_atomic): Add TEST argument.
437 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
438 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
439 save_expr or create_tmp_var* if TEST is true.
440 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
441 Don't call add_stmt here.
442 (struct c_omp_check_loop_iv_data): New type.
443 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
444 c_omp_check_loop_iv_exprs): New functions.
445 (c_omp_split_clauses): Adjust for lastprivate being allowed on
446 distribute.
447 (c_omp_declare_simd_clauses_to_numbers): Change
448 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
449 (c_omp_declare_simd_clauses_to_decls): Similarly change those
450 from numbers to PARM_DECLs.
451
5e8689fb 4522015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
453
454 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
455 flag_checking.
456
aeaccb75 4572015-11-03 Bernd Schmidt <bschmidt@redhat.com>
458
459 PR c++-common/67882
32d050b5 460 * c-common.h (fold_offsetof_1): Add argument.
461 * c-common.c (fold_offsetof_1): Diagnose more invalid
aeaccb75 462 offsetof expressions that reference elements past the end of
463 an array.
464
9e10bfb7 4652015-11-03 Thomas Schwinge <thomas@codesourcery.com>
466 Chung-Lin Tang <cltang@codesourcery.com>
467
468 * c-pragma.c (oacc_pragmas): Add "atomic".
469 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
470
ab50af2a 4712015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
472
473 * c-common.c (handle_target_clones_attribute): New.
474 (c_common_attribute_table): Add handle_target_clones_attribute.
475 (handle_always_inline_attribute): Add check on target_clones attribute.
476 (handle_target_attribute): Ditto.
477
4cba6f60 4782015-10-29 Andrew MacLeod <amacleod@redhat.com>
479
480 * array-notation-common.c: Reorder #include's and remove duplicates.
481 * c-ada-spec.c: Likewise.
482 * c-cilkplus.c: Likewise.
483 * c-common.c: Likewise.
484 * c-cppbuiltin.c: Likewise.
485 * c-dump.c: Likewise.
486 * c-format.c: Likewise.
487 * c-gimplify.c: Likewise.
488 * c-indentation.c: Likewise.
489 * c-lex.c: Likewise.
490 * c-omp.c: Likewise.
491 * c-opts.c: Likewise.
492 * c-pch.c: Likewise.
493 * c-ppoutput.c: Likewise.
494 * c-pragma.c: Likewise.
495 * c-pretty-print.c: Likewise.
496 * c-semantics.c: Likewise.
497 * c-ubsan.c: Likewise.
498 * cilk.c: Likewise.
499 * stub-objc.c: Likewise.
500
f576a2e4 5012015-10-28 Jason Merrill <jason@redhat.com>
502
503 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
504
2c4c8725 5052015-10-27 Thomas Schwinge <thomas@codesourcery.com>
506 James Norris <jnorris@codesourcery.com>
507 Cesar Philippidis <cesar@codesourcery.com>
508
509 PR c/64765
510 PR c/64880
511 * c-common.h (c_oacc_split_loop_clauses): Declare function.
512 * c-omp.c (c_oacc_split_loop_clauses): New function.
513
8204c077 5142015-10-21 Martin Sebor <msebor@redhat.com>
515
516 PR driver/68043
517 * c.opt: End each sentence that describes an option with a period.
518
8523243e 5192015-10-20 Marek Polacek <polacek@redhat.com>
520
521 * array-notation-common.c (is_cilkplus_vector_p): Define.
522 * c-common.h (is_cilkplus_vector_p): Declare.
523
08881cb8 5242015-10-20 Marek Polacek <polacek@redhat.com>
525
526 * c.opt (std=gnu++11): Do not describe as experimental.
527 (std=gnu++14): Likewise.
528
a36e5e5e 5292015-10-19 Jason Merrill <jason@redhat.com>
530
531 * c-cppbuiltin.c (c_cpp_builtins): Define
532 __cpp_nontype_template_args.
533
a349de0a 5342015-10-19 Jason Merrill <jason@redhat.com>
535
536 * c-cppbuiltin.c (c_cpp_builtins): Define
537 __cpp_enumerator_attributes, __cpp_fold_expressions,
538 __cpp_unicode_characters.
539
43895be5 5402015-10-13 Jakub Jelinek <jakub@redhat.com>
541 Aldy Hernandez <aldyh@redhat.com>
542
543 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
544 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
545 (c_define_builtins): Likewise.
546 * c-common.h (enum c_omp_clause_split): Add
547 C_OMP_CLAUSE_SPLIT_TASKLOOP.
548 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
549 (c_finish_omp_for): Add ORIG_DECLV argument.
550 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
551 201511 instead of 201307.
552 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
553 OMP_CRITICAL_CLAUSES to it.
554 (c_finish_omp_ordered): Add CLAUSES argument, set
555 OMP_ORDERED_CLAUSES to it.
556 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
557 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
558 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
559 constructs and new OpenMP 4.5 clauses. Clear
560 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
561 verification code.
562 * c-pragma.c (omp_pragmas_simd): Add taskloop.
563 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
564 (enum pragma_omp_clause): Add
565 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
566 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
567
20cb53c9 5682015-10-05 Richard Sandiford <richard.sandiford@arm.com>
569
570 * c-lex.c (interpret_float): Use real_equal instead of
571 REAL_VALUES_EQUAL.
572
6d02e6b2 5732015-10-04 Jason Merrill <jason@redhat.com>
574
575 Implement N4514, C++ Extensions for Transactional Memory.
576 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
577 (c_common_attribute_table): Add transaction_safe_dynamic.
578 transaction_safe now affects type identity.
579 (handle_tm_attribute): Handle transaction_safe_dynamic.
580 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
581 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
582 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
583 (D_TRANSMEM): New.
584 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
585 * c-pretty-print.c (pp_c_attributes_display): Don't print
586 transaction_safe in C++.
587
c0999a5d 5882015-10-02 Marek Polacek <polacek@redhat.com>
589
590 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
591
ef17a71a 5922015-10-02 Marek Polacek <polacek@redhat.com>
593
594 PR c/64249
595 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
596 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
597 * c.opt (Wduplicated-cond): New option.
598
05b84e7b 5992015-10-01 Joseph Myers <joseph@codesourcery.com>
600
601 * c.opt (std=c11): Do not describe as experimental.
602 (std=gnu11): Likewise.
603 (std=iso9899:2011): Likewise.
604
e561d5e1 6052015-09-28 Nathan Sidwell <nathan@codesourcery.com>
606
607 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
608 (DEF_FUNCTION_TYPE_VAR_11): Delete.
609
bd4b90d2 6102015-09-25 Marek Polacek <polacek@redhat.com>
611
612 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
613 (ubsan_instrument_shift): Likewise.
614
ac13b2b2 6152015-09-25 Marek Polacek <polacek@redhat.com>
616
617 PR sanitizer/64906
618 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
619
a3c82f4c 6202015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
621
622 * c-indentation.c (should_warn_for_misleading_indentation):
623 Compare next_stmt_vis_column with guard_line_first_nws instead
624 of with guard_line_vis_column.
625
5eef101d 6262015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
627
628 PR c/49654
629 PR c/49655
630 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
631 options and options not valid for the current language.
632
60897493 6332015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
634
635 * c-indentation.c (should_warn_for_misleading_indentation):
636 Float out and consolidate the calls to get_visual_column that
637 are passed guard_exploc as an argument. Compare
638 next_stmt_vis_column with guard_line_first_nws instead of with
639 body_line_first_nws.
640
85c93154 6412015-09-22 Nathan Sidwell <nathan@codesourcery.com>
642
643 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
644 Wnamespaces): New C++ warnings.
645
229a58b1 6462015-09-22 Jason Merrill <jason@redhat.com>
647
648 * c-common.h (abi_compat_version_crosses): New.
649 (warn_abi_version): Declare.
650 * c-common.c: Define it.
651 * c-opts.c (c_common_post_options): Handle it.
652 flag_abi_compat_version defaults to 8.
653
2d2de569 6542015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
655
656 Complete the implementation of N4230, Nested namespace definition.
657 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
658 __cpp_nested_namespace_definitions.
659
2b897e68 6602015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
661
662 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
663
ed536208 6642015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
665
666 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
667 when warning.
668 * c-pragma.h (pragma_lex): Add optional loc argument.
669
1dc6c44d 6702015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
671
672 * c-format.c (check_format_arg): Adjust to use common block size in all
673 object pools.
674
be812248 6752015-09-15 David Malcolm <dmalcolm@redhat.com>
676
677 * c-format.c (location_from_offset): Update for change in
678 signature of location_get_source_line.
679 * c-indentation.c (get_visual_column): Likewise.
680 (line_contains_hash_if): Likewise.
681
e4cc057f 6822015-09-14 Marek Polacek <polacek@redhat.com>
683
684 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
685 setting various warnings.
686
85f5e2ee 6872015-09-14 Marek Polacek <polacek@redhat.com>
688
689 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
690 a negative value.
691
1bca8cbd 6922015-09-11 Mark Wielaard <mjw@redhat.com>
693
694 PR c/28901
695 * c.opt (Wunused-variable): Option from common.opt.
696 (Wunused-const-variable): New option.
697
ee48893a 6982015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
699
700 PR c++/53184
701 * c.opt ([Wsubobject-linkage]): Add.
702
547c6b1f 7032015-09-03 Martin Sebor <msebor@redhat.com>
704
705 PR c/66516
706 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
707 functions.
708 * c-common.c (reject_gcc_builtin): Define.
709
7e976b10 7102015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
711
712 PR middle-end/60586
713 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
714 prototype.
715 * c-gimplify.c (c_gimplify_expr): Added a call to the function
716 cilk_gimplify_call_params_in_spawned_fn.
717 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
718 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
719 unwrapping.
720
9e6bcade 7212015-08-25 Marek Polacek <polacek@redhat.com>
722
723 PR middle-end/67330
724 * c-common.c (handle_weak_attribute): Don't check whether the
725 visibility can be changed here.
726
af9de21d 7272015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
728
729 * c-lex.c (c_lex_with_flags): Use explicit locations.
730
6dc50383 7312015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
732
733 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
734 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
735
10902624 7362015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
737
738 PR middle-end/36757
739 * c-common.c (check_builtin_function_arguments): Add check
740 for BUILT_IN_SIGNBIT argument.
741
a03a71ab 7422015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
743
744 PR c++/67160
745 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
746 in c++1z mode.
747
22723c26 7482015-08-17 Marek Polacek <polacek@redhat.com>
749
750 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
751 with whitespaces before qualifier names.
752
f4809955 7532015-08-12 Marek Polacek <polacek@redhat.com>
754
755 PR c++/55095
756 * c-common.c (maybe_warn_shift_overflow): Properly handle
757 left-shifting 1 into the sign bit.
758
5463f502 7592015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
760
761 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
762
56c12fd4 7632015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
764 Braden Obrzut <admin@maniacsvault.net>
765 Jason Merrill <jason@redhat.com>
766
767 Add C++ Concepts TS support.
768 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
769 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
770 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
771 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
772 * c-opts.c (set_std_cxx1z): Set flag_concepts.
773 * c.opt (fconcepts): New.
774
32d050b5 7752015-08-02 Martin Sebor <msebor@redhat.com>
776
777 * c.opt (-Wframe-address): New warning option.
778
17afcef6 7792015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
780
781 * c-indentation.c (should_warn_for_misleading_indentation):
782 Improve heuristics.
783
f95bfdd4 7842015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
785
786 * c-indentation.c (get_visual_column): Add parameter first_nws,
787 use it. Update comment documenting the function.
788 (is_first_nonwhitespace_on_line): Remove.
789 (should_warn_for_misleading_indentation): Replace usage of
790 of is_first_nonwhitespace_on_line with get_visual_column.
791
9255be07 7922015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
793
794 * c-indentation.h (struct token_indent_info): Define.
795 (get_token_indent_info): Define.
796 (warn_for_misleading_information): Declare.
797 * c-common.h (warn_for_misleading_information): Remove.
798 * c-identation.c (warn_for_misleading_indentation):
799 Change declaration to take three token_indent_infos. Adjust
800 accordingly.
801 * c-identation.c (should_warn_for_misleading_indentation):
802 Likewise. Bail out early if the body is a compound statement.
803 (guard_tinfo_to_string): Define.
804
e880695c 8052015-07-30 Jason Merrill <jason@redhat.com>
806
807 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
808 '*' for reference decay.
809
f58dd84b 8102015-07-30 Marek Polacek <polacek@redhat.com>
811
812 * c-common.c (warn_tautological_cmp): Bail for float types.
813
d9e4fe27 8142015-07-27 Marek Polacek <polacek@redhat.com>
815
816 PR bootstrap/67030
817 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
818
6784a472 8192015-07-27 Marek Polacek <polacek@redhat.com>
820
821 PR c++/66555
822 PR c/54979
823 * c-common.c (find_array_ref_with_const_idx_r): New function.
824 (warn_tautological_cmp): New function.
825 * c-common.h (warn_tautological_cmp): Declare.
826 * c.opt (Wtautological-compare): New option.
827
08034975 8282015-07-23 Marek Polacek <polacek@redhat.com>
829
830 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
831 (ubsan_instrument_shift): Likewise.
832
f6f5e49b 8332015-07-23 Marek Polacek <polacek@redhat.com>
834
835 PR sanitizer/66908
836 * c-ubsan.c: Include gimplify.h.
837 (ubsan_instrument_division): Unshare OP0 and OP1.
838 (ubsan_instrument_shift): Likewise.
839
8d669e79 8402015-07-20 Marek Polacek <polacek@redhat.com>
841 Richard Sandiford <richard.sandiford@arm.com>
842
843 PR c++/55095
844 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
845 Use EXPR_LOC_OR_LOC.
846 (maybe_warn_shift_overflow): New function.
847 * c-common.h (maybe_warn_shift_overflow): Declare.
848 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
849 * c.opt (Wshift-overflow): New option.
850
e16712b1 8512015-07-16 Martin Liska <mliska@suse.cz>
852
853 * c-format.c (static void check_format_info_main): Use
854 object_allocator instead of pool_allocator.
855 (check_format_arg): Likewise.
856 (check_format_info_main): Likewise.
857
e51764ad 8582015-07-15 Andrew MacLeod <amacleod@redhat.com>
859
860 * c-opts.c: Remove multiline #include comment.
861
47ae02b7 8622015-07-12 Aldy Hernandez <aldyh@redhat.com>
863
864 * c-common.c: Fix double word typos.
865
ed2b2eb2 8662015-07-10 Eric Botcazou <ebotcazou@adacore.com>
867
868 * c-ada-spec.h (cpp_operation): Revert latest change.
869 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
870 constructors and destructors.
871
1eacc14a 8722015-07-09 Andrew MacLeod <amacleod@redhat.com>
873
874 * c-common.h: Adjust includes for flags.h changes.
875 * stub-objc.c: Likewise.
47ae02b7 876
0124237f 8772015-07-08 Eric Botcazou <ebotcazou@adacore.com>
878
879 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
880 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
881
386ef929 8822015-07-08 Jakub Jelinek <jakub@redhat.com>
883
884 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
885 are to be removed, return NULL rather than original clauses list.
886
9ef16211 8872015-07-07 Andrew MacLeod <amacleod@redhat.com>
888
889 * array-notation-common.c: Adjust includes.
890 * c-ada-spec.c: Likewise.
891 * c-cilkplus.c: Likewise.
892 * c-common.h: Likewise.
893 * c-cppbuiltin.c: Likewise.
894 * c-dump.c: Likewise.
895 * c-format.c: Likewise.
896 * c-gimplify.c: Likewise.
897 * c-indentation.c: Likewise.
898 * c-lex.c: Likewise.
899 * c-omp.c: Likewise.
900 * c-opts.c: Likewise.
901 * c-pch.c: Likewise.
902 * c-ppoutput.c: Likewise.
903 * c-pragma.c: Likewise.
904 * c-pretty-print.c: Likewise.
905 * c-semantics.c: Likewise.
906 * c-ubsan.c: Likewise.
907 * cilk.c: Likewise.
908 * stub-objc.c: Likewise.
909
67ede3e4 9102015-07-07 Eric Botcazou <ebotcazou@adacore.com>
911
912 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
913 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
914
42af8c2a 9152015-07-01 Jason Merrill <jason@redhat.com>
916
fa769cc5 917 * c-common.h (D_CXX11): Rename from D_CXX0X.
918 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
919 * c-common.c: Adjust.
920
97e9c847 921 * c-opts.c (c_common_post_options): Default to C++14.
922
42af8c2a 923 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
924
30b1ba42 9252015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
926
927 Implement N4197 - Adding u8 character literals
32d050b5 928 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
95858835 929 CPP_CHAR.
32d050b5 930 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
95858835 931 CPP_UTF8CHAR_USERDEF tokens.
32d050b5 932 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
95858835 933 and CPP_UTF8CHAR tokens.
934 (lex_charconst): Treat CPP_UTF8CHAR token.
30b1ba42 935
0949f227 9362015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
937
938 PR fortran/66605
939 * c-common.c (do_warn_unused_parameter): Move here.
940 * c-common.h (do_warn_unused_parameter): Declare.
941
be23b16f 9422015-06-29 Marek Polacek <polacek@redhat.com>
943
944 PR c/66322
945 * c-common.c (check_case_bounds): Add bool * parameter. Set
946 OUTSIDE_RANGE_P.
947 (c_add_case_label): Add bool * parameter. Pass it down to
948 check_case_bounds.
949 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
950 warning here.
951 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
952 declarations.
953
6290f0db 9542015-06-27 Marek Polacek <polacek@redhat.com>
955
956 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
957 or VECTOR_INTEGER_TYPE_P throughout.
958 * c-gimplify.c: Likewise.
959
aa3e402e 9602015-06-26 Marek Polacek <polacek@redhat.com>
961
962 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
963 * c-common.c (c_fully_fold_internal): Likewise.
964 (c_alignof_expr): Likewise.
965 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
966 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
8204c077 967 * cilk.c (create_parm_list): Likewise.
aa3e402e 968
4e81b384 9692015-06-26 Marek Polacek <polacek@redhat.com>
970
971 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
972
ec2e0095 9732015-06-25 Andrew MacLeod <amacleod@redhat.com>
974
975 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
976 * c-gimplify.c: Likewise.
977 * c-pragma.c: Likewise.
978 * c-ubsan.c: Likewise.
979 * cilk.c: Likewise.
980
b594087e 9812015-06-25 Richard Sandiford <richard.sandiford@arm.com>
982
983 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
984 ggc_hasher.
985
a3c76fda 9862015-06-25 Andrew MacLeod <amacleod@redhat.com>
987
988 * cilk.c: Move calls.h after tm.h in the include chain.
989
f48c7f4a 9902015-06-25 Marek Polacek <polacek@redhat.com>
991
992 * array-notation-common.c: Use VAR_P throughout.
993 * c-ada-spec.c: Likewise.
994 * c-common.c: Likewise.
995 * c-format.c: Likewise.
996 * c-gimplify.c: Likewise.
997 * c-omp.c: Likewise.
998 * c-pragma.c: Likewise.
999 * c-pretty-print.c: Likewise.
1000 * cilk.c: Likewise.
1001
ce41e81a 10022015-06-25 Marek Polacek <polacek@redhat.com>
1003
1004 * cilk.c (extract_free_variables): Use is_global_var.
1005
de231ec2 10062015-06-23 Richard Sandiford <richard.sandiford@arm.com>
1007
1008 * c-common.c: Don't include target-def.h.
1009
0200602e 10102015-06-23 Marek Polacek <polacek@redhat.com>
1011
1012 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
1013 when comparing INTEGER_CSTs.
1014
99838ed7 10152015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
1016
1017 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
1018 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
1019 (dump_ada_template): Skip partially specialized types.
1020
a4f59596 10212015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
1022
1023 * c-common.c (scalar_to_vector): Use std::swap instead of manually
1024 swapping.
1025
f2ab3bac 10262015-06-17 Andrew MacLeod <amacleod@redhat.com>
1027
1028 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
1029 * c-ada-spec.c: Likewise.
1030 * c-cilkplus.c: Likewise.
1031 * c-common.c: Likewise.
1032 * c-common.h: Likewise.
1033 * c-cppbuiltin.c: Likewise.
1034 * c-dump.c: Likewise.
1035 * c-format.c: Likewise.
1036 * c-gimplify.c: Likewise.
1037 * c-indentation.c: Likewise.
1038 * c-lex.c: Likewise.
1039 * c-omp.c: Likewise.
1040 * c-opts.c: Likewise.
1041 * c-pch.c: Likewise.
1042 * c-ppoutput.c: Likewise.
1043 * c-pragma.c: Likewise.
1044 * c-pretty-print.c: Likewise.
1045 * c-semantics.c: Likewise.
1046 * c-ubsan.c: Likewise.
1047 * cilk.c: Likewise.
1048 * stub-objc.c: Likewise.
1049
db3d1ffc 10502015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
1051
1052 PR c++/65168
1053 * c-common.c (c_common_truthvalue_conversion): Warn when
1054 converting an address of a reference to a truth value.
1055
64486212 10562015-06-08 Andrew MacLeod <amacleod@redhat.com>
1057
1058 * array-notation-common.c : Adjust include files.
1059 * c-ada-spec.c : Likewise.
1060 * c-cilkplus.c : Likewise.
1061 * c-common.c : Likewise.
1062 * c-common.h : Likewise.
1063 * c-cppbuiltin.c : Likewise.
1064 * c-dump.c : Likewise.
1065 * c-format.c : Likewise.
1066 * c-gimplify.c : Likewise.
1067 * c-indentation.c : Likewise.
1068 * c-lex.c : Likewise.
1069 * c-omp.c : Likewise.
1070 * c-opts.c : Likewise.
1071 * c-pch.c : Likewise.
1072 * c-ppoutput.c : Likewise.
1073 * c-pragma.c : Likewise.
1074 * c-pretty-print.c : Likewise.
1075 * c-semantics.c : Likewise.
1076 * c-ubsan.c : Likewise.
1077 * cilk.c : Likewise.
1078 * stub-objc.c : Likewise.
1079
6e84ccad 10802015-06-08 Marek Polacek <polacek@redhat.com>
1081
1082 PR c/66415
1083 * c-format.c (location_from_offset): Return LOC if LINE is null.
1084
3a1c9df2 10852015-06-05 Aldy Hernandez <aldyh@redhat.com>
1086
1087 * c-common.h (c_parse_final_cleanups): New prototype.
1088 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
1089
32d050b5 10902015-06-04 Sriraman Tallam <tmsriram@google.com>
1091
1092 * c-common.c (noplt): New attribute.
1093 (handle_noplt_attribute): New handler.
1094
f77c0292 10952015-06-04 Andrew MacLeod <amacleod@redhat.com>
1096
1097 * array-notation-common.c: Adjust includes for restructured coretypes.h.
1098 * c-ada-spec.c: Likewise.
1099 * c-cilkplus.c: Likewise.
1100 * c-common.c: Likewise.
1101 * c-common.h: Likewise.
1102 * c-cppbuiltin.c: Likewise.
1103 * c-dump.c: Likewise.
1104 * c-format.c: Likewise.
1105 * c-gimplify.c: Likewise.
1106 * c-indentation.c: Likewise.
1107 * c-lex.c: Likewise.
1108 * c-omp.c: Likewise.
1109 * c-opts.c: Likewise.
1110 * c-pch.c: Likewise.
1111 * c-ppoutput.c: Likewise.
1112 * c-pragma.c: Likewise.
1113 * c-pretty-print.c: Likewise.
1114 * c-semantics.c: Likewise.
1115 * c-ubsan.c: Likewise.
1116 * cilk.c: Likewise.
1117 * stub-objc.c: Likewise.
1118
7c62dfbb 11192015-06-02 David Malcolm <dmalcolm@redhat.com>
1120
1121 PR c/66220:
1122 * c-indentation.c (should_warn_for_misleading_indentation): Use
1123 expand_location rather than expand_location_to_spelling_point.
1124 Don't warn if the guarding statement is more indented than the
1125 next/body stmts.
1126
9af7c176 11272015-06-02 David Malcolm <dmalcolm@redhat.com>
1128
1129 * c-indentation.c (warn_for_misleading_indentation): Bail out
1130 immediately if -Wmisleading-indentation isn't enabled.
1131
eebcf436 11322015-06-01 Martin Liska <mliska@suse.cz>
1133
1134 * c-format.c (check_format_arg):Use new type-based pool allocator.
1135 (check_format_info_main) Likewise.
1136
b0a23e2f 11372015-05-31 Eric Botcazou <ebotcazou@adacore.com>
1138
1139 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
1140 (has_nontrivial_methods): Likewise.
1141
63dc1330 11422015-05-25 Marek Polacek <polacek@redhat.com>
1143
1144 * c-ubsan.c (ubsan_instrument_shift): Use type0.
1145
5a4c69dd 11462015-05-22 Marek Polacek <polacek@redhat.com>
1147
1148 PR c/47043
1149 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
1150
044580bb 11512015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3764c94e 1152
1153 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
1154 STACK_GROWS_DOWNWARD.
1155
044580bb 11562015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2b785411 1157
1158 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
1159 STACK_GROWS_DOWNWARD rather than if it is defined.
1160
d5a2ddc7 11612015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8204c077 1162
d5a2ddc7 1163 PR c/52952
1164 * c-format.c (location_column_from_byte_offset): New.
1165 (location_from_offset): New.
1166 (struct format_wanted_type): Add offset_loc field.
1167 (check_format_info): Move handling of location for extra arguments
1168 closer to the point of warning.
1169 (check_format_info_main): Pass the result of location_from_offset
1170 to warning_at.
1171 (format_type_warning): Pass the result of location_from_offset
1172 to warning_at.
1173
72f8014e 11742015-05-20 Marek Polacek <polacek@redhat.com>
1175
1176 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
1177
74efe522 11782015-05-20 Marek Polacek <polacek@redhat.com>
1179
1180 * c-ada-spec.c (dump_sloc): Use DECL_P.
1181
b443c459 11822015-05-20 Marek Polacek <polacek@redhat.com>
1183
1184 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1185 * c-common.c: Likewise.
1186
551e34da 11872015-05-19 David Malcolm <dmalcolm@redhat.com>
1188
1189 * c-common.h (fe_file_change): Strengthen param from
1190 const line_map * to const line_map_ordinary *.
1191 (pp_file_change): Likewise.
1192 * c-lex.c (fe_file_change): Likewise.
1193 (cb_define): Use linemap_check_ordinary when invoking
1194 SOURCE_LINE.
1195 (cb_undef): Likewise.
1196 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
1197 invoking cb_file_change.
1198 (c_finish_options): Likewise.
1199 (push_command_line_include): Likewise.
1200 (cb_file_change): Strengthen param "new_map" from
1201 const line_map * to const line_map_ordinary *.
1202 * c-ppoutput.c (cb_define): Likewise for local "map".
1203 (pp_file_change): Likewise for param "map" and local "from".
1204
dfcf26a5 12052015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1206
1207 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
1208
2e474820 12092015-05-18 Tom de Vries <tom@codesourcery.com>
1210
1211 * c-common.c (build_va_arg_1): New function.
1212 (build_va_arg): Add address operator to va_list operand if necessary.
1213
e53013a8 12142015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
1215
1216 PR c/48956
1217 * c-common.c (int_safely_convertible_to_real_p): Define.
1218 (unsafe_conversion_p): Check conversions involving complex types.
1219 (conversion_warning): Add new warning message for conversions which
1220 discard imaginary component.
1221 * c-common.h: (enum conversion_safety): Add new enumerator for such
1222 conversions.
1223
aac24642 12242015-05-14 Marek Polacek <polacek@redhat.com>
1225
1226 PR c/66066
1227 PR c/66127
1228 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
1229 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
1230 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
1231 use it. If FOR_INT_CONST, require that all evaluated operands be
1232 INTEGER_CSTs.
1233
e5f01cba 12342015-05-12 David Malcolm <dmalcolm@redhat.com>
1235
1236 * c-common.h (warn_for_misleading_indentation): New prototype.
1237 * c-indentation.c: New file.
1238 * c.opt (Wmisleading-indentation): New option.
1239
c37be9ec 12402015-05-12 Tom de Vries <tom@codesourcery.com>
1241
1242 PR tree-optimization/66010
1243 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
1244
7290114b 12452015-05-09 Jason Merrill <jason@redhat.com>
1246
3c665566 1247 * c-opts.c (c_common_post_options): Also clear
1248 cpp_opts->cpp_warn_cxx11_compat.
1249
d875b9d2 1250 * c-common.h (enum cxx_dialect): Add cxx_unset.
1251 * c-common.c (cxx_dialect): Initialize to cxx_unset.
1252 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
1253
7290114b 1254 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
1255 (std=gnu++0x): Mark as Undocumented.
1256 (std=gnu++1y): Add deprecated message.
1257
1b03cc89 12582015-05-08 Jason Merrill <jason@redhat.com>
1259
1c5f7aba 1260 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
1261 * c-opts.c: Adjust.
1262
1b03cc89 1263 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
1264
dc5945dc 12652015-05-08 Marek Polacek <polacek@redhat.com>
1266
1267 PR c/64918
1268 * c.opt (Woverride-init-side-effects): New option.
1269
cdc64059 12702015-05-07 Marek Polacek <polacek@redhat.com>
1271
1272 PR c/65179
1273 * c-common.c (c_fully_fold_internal): Warn when left shifting a
1274 negative value.
1275 * c.opt (Wshift-negative-value): New option.
1276 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
1277 when -Wextra and C99/C++11 mode.
1278
8cafe283 12792015-05-07 Marek Polacek <polacek@redhat.com>
1280 Martin Uecker <uecker@eecs.berkeley.edu>
1281
1282 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
1283 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
1284
cb40a6f7 12852015-05-05 Jason Merrill <jason@redhat.com>
1286
1287 * c.opt (Wterminate): New.
1288
14744a16 12892015-04-30 Marek Polacek <polacek@redhat.com>
1290
1291 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
1292 require that the non-constant be of a boolean type.
1293
9866562d 12942015-04-29 Josh Triplett <josh@joshtriplett.org>
1295
8cafe283 1296 * c-common.c (handle_section_attribute): Refactor to reduce
1297 nesting and distinguish between error cases.
9866562d 1298
a720ab1c 12992015-04-29 Marek Polacek <polacek@redhat.com>
1300
1301 PR c/64610
1302 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
1303 with 0/1.
1304
8c072e52 13052015-04-29 Jakub Jelinek <jakub@redhat.com>
1306
1307 * c-common.h (omp_clause_mask): Unconditionally define as a class.
1308 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
1309 HOST_BITS_PER_WIDE_INT.
1310
f7fec1c7 13112015-04-28 Tom de Vries <tom@codesourcery.com>
1312
1313 PR tree-optimization/65887
1314 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
1315
483b3d26 13162015-04-28 Eric Botcazou <ebotcazou@adacore.com>
8cafe283 1317 Pierre-Marie de Rodat <derodat@adacore.com>
483b3d26 1318
1319 * c-ada-spec.c (in_function): Delete.
1320 (dump_generic_ada_node): Do not change in_function and remove the
1321 redundant code dealing with it.
1322 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
1323 (print_ada_methods): Output the static member functions in a nested
1324 package after the regular methods as well as associated renamings.
1325
f11bdffb 13262015-04-24 Marek Polacek <polacek@redhat.com>
1327
1328 PR c/65830
1329 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
1330 and OPT_Wshift_count_overflow.
1331
485f6b9c 1332 PR c/63357
1333 * c-common.c (warn_logical_operator): Warn if the operands have the
1334 same expressions.
1335
439606a9 13362015-04-24 Marek Polacek <polacek@redhat.com>
1337
1338 PR c/61534
1339 * c-common.c (warn_logical_operator): Bail if either operand comes
1340 from a macro expansion.
1341
de801c28 13422015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1343
1344 PR target/55143
1345 * c-common.c (c_default_pointer_mode): Add definition.
1346 * c-common.h (c_default_pointer_mode): Add declaration.
1347
76738f56 13482015-03-11 Jakub Jelinek <jakub@redhat.com>
1349
1350 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
1351 on record_builtin_type argument.
1352
16f958b3 13532015-03-10 Jakub Jelinek <jakub@redhat.com>
1354
1355 PR c/65120
1356 * c-common.c (warn_logical_not_parentheses): Don't warn for
1357 !x == 0 or !x != 0.
1358
9b22f73f 13592015-03-07 Marek Polacek <polacek@redhat.com>
1360
1361 PR sanitizer/65280
1362 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
1363 before trying to figure out whether we have a flexible array member.
1364
a864b7d4 13652015-03-06 Eric Botcazou <ebotcazou@adacore.com>
1366 Jonathan Wakely <jwakely.gcc@gmail.com>
1367
1368 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
1369
9bf8c90b 13702015-03-05 Eric Botcazou <ebotcazou@adacore.com>
1371
1372 PR ada/65319
1373 * c-ada-spec.c (print_destructor): Remove obsolete code.
1374
037ac54f 13752015-03-01 Eric Botcazou <ebotcazou@adacore.com>
1376
1377 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
1378 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
1379 DECL_TEMPLATE_RESULT emulations.
1380 (dump_ada_template)): Add guard for TYPE_METHODS.
1381
495cbfb8 13822015-02-27 Marek Polacek <polacek@redhat.com>
1383
1384 PR c/65040
1385 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
1386
688a864e 13872015-02-27 Kai Tietz <ktietz@redhat.com>
1388
1389 PR c/35330
1390 * c-pragma.c (handle_pragma_weak): Do not try to create
1391 weak/alias of declarations not being function, or variable
1392 declarations.
1393
6349b8cc 13942015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1395
1396 PR libgomp/64625
1397 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1398 Remove macros.
1399 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1400
3afd5369 14012015-02-16 Marek Polacek <polacek@redhat.com>
1402
1403 PR c/65066
1404 * c-format.c (check_format_types): Handle null param.
1405
46173d1b 14062015-02-13 Marek Polacek <polacek@redhat.com>
1407
1408 PR c/65040
1409 * c-format.c (check_format_types): Don't warn about different
1410 signedness if the original value is in the range of WANTED_TYPE.
1411
1d524ff7 14122015-02-12 Jason Merrill <jason@redhat.com>
1413
1414 PR c++/64956
1415 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
1416 to the current highest version.
1417 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
1418
bbf8fbec 14192015-02-04 Jakub Jelinek <jakub@redhat.com>
1420
1421 PR c/64824
1422 PR c/64868
1423 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
1424 instead of RDIV_EXPR. Use build_binary_op instead of
1425 build2_loc.
1426
c05be867 14272015-01-30 Joseph Myers <joseph@codesourcery.com>
1428
1429 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
1430 to pass input_location as first argument.
1431
85977647 14322015-01-23 Tom de Vries <tom@codesourcery.com>
1433
1434 PR libgomp/64672
1435 * c.opt (fopenacc): Mark as LTO option.
1436
fa175926 14372015-01-23 Tom de Vries <tom@codesourcery.com>
1438
1439 PR libgomp/64707
1440 * c.opt (fopenmp): Mark as LTO option.
1441
20aad5ba 14422015-01-21 Jakub Jelinek <jakub@redhat.com>
1443
1444 PR c/63307
8204c077 1445 * cilk.c (fill_decls_vec): Only put decls into vector v.
20aad5ba 1446 (compare_decls): Fix up formatting.
1447
14482015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
1449
1450 PR c/63307
1451 * cilk.c: Include vec.h.
1452 (struct cilk_decls): New structure.
1453 (wrapper_parm_cb): Split this function to...
1454 (fill_decls_vec): ...this...
1455 (create_parm_list): ...and this.
1456 (compare_decls): New function.
1457 (for_local_cb): Remove.
1458 (wrapper_local_cb): Ditto.
1459 (build_wrapper_type): For now first traverse and fill vector of
1460 declarations then sort it and then deal with sorted vector.
1461 (cilk_outline): Ditto.
1462 (declare_one_free_variable): Ditto.
1463
60b77e28 14642015-01-21 Jason Merrill <jason@redhat.com>
1465
1466 PR c++/64629
1467 * c-format.c (check_format_arg): Call decl_constant_value.
1468
85fbea97 14692015-01-19 Martin Liska <mliska@suse.cz>
1470
1471 * c-common.c (handle_noicf_attribute): New function.
1472
ca4c3545 14732015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1474 Bernd Schmidt <bernds@codesourcery.com>
1475 James Norris <jnorris@codesourcery.com>
1476 Cesar Philippidis <cesar@codesourcery.com>
1477 Ilmir Usmanov <i.usmanov@samsung.com>
1478 Jakub Jelinek <jakub@redhat.com>
1479
1480 * c.opt (fopenacc): New option.
1481 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
1482 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1483 New macros.
1484 * c-common.h (c_finish_oacc_wait): New prototype.
1485 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
1486 (c_finish_oacc_wait): New function.
1487 * c-pragma.c (oacc_pragmas): New variable.
1488 (c_pp_lookup_pragma, init_pragma): Handle it.
1489 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
1490 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
1491 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
1492 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1493 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
1494 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
1495 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
1496 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
1497 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
1498 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
1499 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
1500 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
1501 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
1502 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
1503 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
1504 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
1505 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
1506 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
1507 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
1508 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
1509 PRAGMA_OACC_CLAUSE_WORKER.
1510
947aa916 15112015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
1512
1513 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
1514 for the new option fstack-protector_explicit.
1515 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
1516 (handle_stack_protect_attribute): New function.
1517
e4fd7af1 15182015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
1519
1520 * c.opt: New option -Warray-bounds=.
1521
1f78217c 15222015-01-09 Michael Collison <michael.collison@linaro.org>
1523
1524 * array-notation-common.c: Include hash-set.h, machmode.h,
1525 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1526 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1527 * c-ada-spec.c: Ditto.
1528 * c-cilkplus.c: Ditto.
1529 * c-common.c: Include input.h due to flattening of tree.h.
1530 Define macro GCC_C_COMMON_C.
1531 * c-common.h: Flatten tree.h header files into c-common.h.
1532 Remove include of tree-core.h.
1533 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
1534 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1535 fold-const.h, wide-int.h, and inchash.h due to
1536 flattening of tree.h.
1537 * c-dump.c: Ditto.
1538 * c-format.c: Flatten tree.h header files into c-common.h.
1539 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
1540 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1541 fold-const.h, wide-int.h, and inchash.h due to
1542 flattening of tree.h.
1543 * c-dump.c: Include hash-set.h, machmode.h,
1544 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1545 fold-const.h, wide-int.h, and inchash.h due to
1546 flattening of tree.h.
1547 * c-format.c: Include hash-set.h, machmode.h,
1548 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1549 fold-const.h, wide-int.h, inchash.h and real.h due to
1550 flattening of tree.h.
1551 * c-gimplify.c: Include hash-set.h, machmode.h,
1552 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1553 fold-const.h, wide-int.h, and inchash.h due to
1554 flattening of tree.h.
1555 * cilk.c: Ditto.
1556 * c-lex.c: Ditto.
1557 * c-omp.c: Ditto.
1558 * c-opts.c: Ditto.
1559 * c-pch.c: Ditto.
1560 * c-ppoutput.c: Ditto.
1561 * c-pragma.c: Ditto.
1562 * c-pretty-print.c: Ditto.
1563 * c-semantics.c: Ditto.
1564 * c-ubsan.c: Ditto.
1565 * stub-objc.c: Ditto.
1566
411b7663 15672015-01-08 Jason Merrill <jason@redhat.com>
1568
1569 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
1570 do_ubsan_in_current_function.
1571 (ubsan_maybe_instrument_reference_or_call): Likewise.
1572 * c-ubsan.h: Declare it.
1573
d1e96383 15742015-01-08 Mike Stump <mikestump@comcast.net>
1575
1576 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
1577
b57910fa 15782015-01-07 Marek Polacek <polacek@redhat.com>
1579
1580 PR c/64440
1581 * c-common.c (c_fully_fold_internal): Warn for division and modulo
1582 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
1583
678a4e3e 15842015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1585
1586 PR c++/31397
1587 * c.opt (Wsuggest-override): New option.
1588
d353bf18 15892015-01-05 Jakub Jelinek <jakub@redhat.com>
1590
1591 Update copyright years.
1592
92b63884 15932015-01-05 Marek Polacek <polacek@redhat.com>
1594
1595 PR c/64423
1596 * c-common.c (warn_array_subscript_with_type_char): Add location_t
1597 parameter. Use it.
1598 * c-common.h (warn_array_subscript_with_type_char): Update
1599 declaration.
1600
83715bc4 16012014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
1602
1603 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
1604 Control macro with flag_sized_deallocation.
1605
8a8211df 16062014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1607
1608 * c.opt (Wdiscarded-array-qualifiers): New option.
1609
33058239 16102014-12-19 Jakub Jelinek <jakub@redhat.com>
1611
1612 PR preprocessor/63831
1613 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
1614 and __has_cpp_attribute here.
1615 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
1616 c_common_has_attribute.
1617 * c-common.h (c_common_has_attribute): New prototype.
1618 * c-lex.c (init_c_lex): Set cb->has_attribute to
1619 c_common_has_attribute instead of cb_has_attribute.
1620 (get_token_no_padding): New function.
1621 (cb_has_attribute): Renamed to ...
1622 (c_common_has_attribute): ... this. No longer static. Use
1623 get_token_no_padding, require ()s, don't build TREE_LIST
1624 unnecessarily, fix up formatting, adjust diagnostics, call
1625 init_attributes.
1626
d1856d2c 16272014-12-15 Jason Merrill <jason@redhat.com>
1628
1629 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
1630 (-Wsized-deallocation): New.
1631 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
1632 to on in C++14 and up.
1633
4972ed5d 16342014-12-11 Jason Merrill <jason@redhat.com>
1635
7d7fa964 1636 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
1637
4972ed5d 1638 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
1639 we aren't complaining about VLAs.
1640
5ebccf71 16412014-12-06 Marek Polacek <polacek@redhat.com>
1642
1643 PR tree-optimization/64183
1644 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
1645 shift-expression if it is integer_type_node. Use types_compatible_p.
1646
f9e245b2 16472014-11-29 Jakub Jelinek <jakub@redhat.com>
1648
1649 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
1650 last argument from create_tmp_var_raw and create_tmp_var calls.
1651 * cilk.c (gimplify_cilk_spawn): Likewise.
1652 * c-omp.c (c_finish_omp_atomic): Likewise.
1653
d2f60593 16542014-11-28 Marek Polacek <polacek@redhat.com>
1655
1656 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
1657 instead of unsigned_type_node.
1658
fce2dbd1 16592014-11-28 Marek Polacek <polacek@redhat.com>
1660
1661 PR c/63862
1662 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
1663 to op1_utype.
1664 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
1665 expression to unsigned_type_node.
1666
3a4a2292 16672014-11-20 Mark Wielaard <mjw@redhat.com>
1668
1669 PR debug/38757
1670 * c-opts.c (set_std_c89): Set lang_hooks.name.
1671 (set_std_c99): Likewise.
1672 (set_std_c11): Likewise.
1673 (set_std_cxx98): Likewise.
1674 (set_std_cxx11): Likewise.
1675 (set_std_cxx14): Likewise.
1676 (set_std_cxx1z): Likewise.
1677
c61ef207 16782014-11-21 Jakub Jelinek <jakub@redhat.com>
1679
1680 PR target/63764
1681 * c-common.h (convert_vector_to_pointer_for_subscript): Change
1682 return type to bool.
c9ed79de 1683 * c-common.c: Include gimple-expr.h.
c61ef207 1684 (convert_vector_to_pointer_for_subscript): Change return type to
1685 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
1686 and copy it into a TARGET_EXPR and use that instead of *vecp
1687 directly.
1688
1a91d914 16892014-11-19 David Malcolm <dmalcolm@redhat.com>
1690
1691 Merger of git branch "gimple-classes-v2-option-3".
1692 * ChangeLog.gimple-classes: New.
1693 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
1694 from being just a vec<gimple> to a vec<gbind *>.
1695
f8fc8b8e 16962014-11-18 Jakub Jelinek <jakub@redhat.com>
1697
1698 PR sanitizer/63813
1699 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
1700 argument to ptype, set type to TREE_TYPE (ptype). Don't call
1701 get_pointer_alignment for non-pointers. Use ptype, or if it is
1702 reference type, corresponding pointer type, as type of kind
1703 argument.
1704 (ubsan_maybe_instrument_reference,
1705 ubsan_maybe_instrument_member_call): Adjust callers.
1706
8315e35e 17072014-11-15 Marek Polacek <polacek@redhat.com>
1708
1709 PR middle-end/63884
1710 * array-notation-common.c (is_sec_implicit_index_fn): Return false
1711 for NULL fndecl.
1712 (extract_array_notation_exprs): Return for NULL node.
1713
86b9f14b 17142014-11-12 Joseph Myers <joseph@codesourcery.com>
1715
1716 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
1717 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
1718
0c93c8a9 17192014-11-12 Jakub Jelinek <jakub@redhat.com>
1720
1721 PR c/59708
1722 * c-common.c (check_builtin_function_arguments): Handle
1723 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
1724
fdd735a7 17252014-11-10 Andi Kleen <ak@linux.intel.com>
1726
1727 PR c/60804
1728 * c-common.h (check_no_cilk): Declare.
1729 * cilk.c (get_error_location): New function.
1730 (check_no_cilk): Dito.
1731
5cb678b4 17322014-11-10 Andi Kleen <ak@linux.intel.com>
1733
1734 * cilk.c (recognize_spawn): Use expression location
1735 for error message.
1736
0feb4de1 17372014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1738
1739 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
1740
3aa2fa44 17412014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
1742
1743 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
1744 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
1745 (__cpp_range_based_for, __cpp_initializer_lists,
1746 __cpp_delegating_constructors, __cpp_nsdmi,
1747 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
1748 for C++11; (__cpp_attribute_deprecated): Remove in favor of
1749 __has_cpp_attribute.
1750 * c-lex.c (cb_has_attribute): New callback CPP function;
1751 (init_c_lex): Set has_attribute callback.
1752
7fd22aae 17532014-11-04 Richard Biener <rguenther@suse.de>
1754
1755 * c-common.c (shorten_compare): Do not shorten mixed
1756 DFP and non-DFP compares.
1757
4af203ac 17582014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
1759
1760 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
1761 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
1762 Commentary and rearrangement of tests.
1763 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
1764 Commentary and rearrangement of tests.
1765 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
1766 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
1767
3754d046 17682014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1769
1770 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
1771 enum from machine_mode.
1772
1140c305 17732014-10-28 Andrew MacLeod <amacleod@redhat.com>
1774
1f78217c 1775 * c-common.c: Adjust include files.
1776 * c-gimplify.c: Ditto.
1777 * cilk.c: Ditto.
1778 * c-pragma.c: Ditto.
1779 * c-ubsan.c: Ditto.
1140c305 1780
94ea8568 17812014-10-27 Andrew MacLeod <amacleod@redhat.com>
1782
1783 * c-gimplify.c: Adjust include files.
1784
32ecf960 17852014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1786
1787 PR c++/53061
1788 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
1789 c_common_initialize_diagnostics.
1790 * c-common.h: Likewise.
1791
85fecbe2 17922014-10-24 Marek Polacek <polacek@redhat.com>
1793
1794 PR c/56980
1795 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
1796 print "struct"/"union"/"enum" for typedefed names.
1797
e7ec033a 17982014-10-23 Marek Polacek <polacek@redhat.com>
1799
1800 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
1801 in unsigned type.
1802
c2598081 18032014-10-22 Jakub Jelinek <jakub@redhat.com>
1804 Yury Gribov <y.gribov@samsung.com>
1805
1806 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
1807 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
1808 instead of flag_sanitize_recover as bool flag.
1809
acebb7e2 18102014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
1811
1812 * cilk.c: Revert previous change.
1813
6115016c 18142014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
1815
1816 PR c/63307
1817 * cilk.c: Include vec.h.
1818 (struct cilk_decls): New structure.
1819 (wrapper_parm_cb): Split this function to...
1820 (fill_decls_vec): ...this...
1821 (create_parm_list): ...and this.
1822 (compare_decls): New function.
1823 (for_local_cb): Remove.
1824 (wrapper_local_cb): Ditto.
1825 (build_wrapper_type): For now first traverse and fill vector of
1826 declarations then sort it and then deal with sorted vector.
1827 (cilk_outline): Ditto.
1828 (declare_one_free_variable): Ditto.
1829
e610d2b2 18302014-10-17 Marek Polacek <polacek@redhat.com>
1831
1832 * c-opts.c (c_common_post_options): Set warn_implicit_int.
1833 * c.opt (Wimplicit-int): Initialize to -1.
1834
a3020f2f 18352014-10-16 Andrew MacLeod <amacleod@redhat.com>
1836
1837 * c-pragma.c: Adjust include files.
1838 * c-semantics.c: Likewise.
1839
926ddd2c 18402014-10-16 DJ Delorie <dj@redhat.com>
1841
1842 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
1843 multiples of bytes.
1844
b0542e7c 18452014-10-14 Jason Merrill <jason@redhat.com>
1846
1847 PR c++/63455
1848 * c-common.h (CPP_PREPARSED_EXPR): New.
1849 (N_CP_TTYPES): Adjust.
1850
b2601928 18512014-10-15 Marek Polacek <polacek@redhat.com>
1852
1853 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
1854
9f75f026 18552014-10-14 DJ Delorie <dj@redhat.com>
1856
1857 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
1858 types, not just __int128.
1859 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
1860 types, not just __int128.
1861 (cpp_atomic_builtins): Round pointer sizes up.
1862 (type_suffix): Use type precision, not specific types.
1863 * c-common.c (c_common_reswords): Remove __int128 special case.
1864 (c_common_type_for_size): Check for all __intN types, not just
1865 __int128.
1866 (c_common_type_for_mode): Likewise.
1867 (c_common_signed_or_unsigned_type): Likewise.
1868 (c_build_bitfield_integer_type): Likewise.
1869 (c_common_nodes_and_builtins): Likewise.
1870 (keyword_begins_type_specifier): Likewise.
1871 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
1872 __intN variants.
1873
2ef51f0e 18742014-10-12 Trevor Saunders <tsaunders@mozilla.com>
1875
1876 * c-common.c: Use hash_table instead of hashtab.
1877
5b8257e3 18782014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
1879
1f78217c 1880 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
5b8257e3 1881 C++11 section.
1882
5e84569c 18832014-10-03 Marc Glisse <marc.glisse@inria.fr>
1884
1885 PR c++/54427
1886 PR c++/57198
1887 PR c++/58845
1888 * c-common.c (warn_logical_operator): Punt for vectors.
1889
f6751ff2 18902014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
1891
1892 Implement SD-6: SG10 Feature Test Recommendations
1893 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
1894 macros and the __has_header macro.
1895
c33e051d 18962014-09-30 Jason Merrill <jason@redhat.com>
1897
f76a9aa8 1898 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
1899 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
1900 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
1901
717e52f9 1902 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
1903 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
1904
c33e051d 1905 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
1906 * c-common.c (c_common_reswords): Remove __is_convertible_to.
1907
5213d6c9 19082014-09-24 Marek Polacek <polacek@redhat.com>
1909
1910 PR c/61405
1911 PR c/53874
1912 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
1913
6b722052 19142014-09-23 Andi Kleen <ak@linux.intel.com>
1915
1916 * c-common.c (handle_no_reorder_attribute): New function.
1917 (c_common_attribute_table): Add no_reorder attribute.
1918
0cb69d12 19192014-09-22 Joseph Myers <joseph@codesourcery.com>
1920
1921 * c-cppbuiltin.c (c_cpp_builtins): Define
1922 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
1923 modes.
1924
168dfbf0 19252014-09-18 Joseph Myers <joseph@codesourcery.com>
1926
1927 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
1928 for supported floating-point modes.
1929
b83705f4 19302014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
1931
1932 * c.opt (Wpsabi): Use LangEnabledBy.
1933 * c-opts.c (c_common_handle_option): Do not handle here.
1934
d5957f0d 19352014-09-12 Joseph Myers <joseph@codesourcery.com>
1936
1937 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
1938 macros for floating-point modes.
1939
bae6edff 19402014-09-11 Marc Glisse <marc.glisse@inria.fr>
1941
1942 PR target/58757
1943 * c-cppbuiltin.c (builtin_define_float_constants): Correct
1944 __*_DENORM_MIN__ without denormals.
1945
73a69d02 19462014-09-10 Jakub Jelinek <jakub@redhat.com>
1947
1948 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
1949 ubsan_instrument_vla, ubsan_instrument_return): Adjust
1950 ubsan_create_data callers.
1951 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
1952 index is constant or BIT_AND_EXPR with constant mask and is
1953 small enough for the bound.
1954 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
1955 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
1956
7ff8db31 19572014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
1958
1959 * c.opt: Add CppReason to various flags.
1960 (Wdate-time): Re-sort.
1961 * c-common.c: Include c-common.h earlier.
1962 (struct reason_option_codes_t): Delete.
1963 (c_option_controlling_cpp_error): Prefix global type and struct
1964 with cpp_.
1965
bcc1f37e 19662014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
1967
1968 * c.opt (Wnormalized): New.
1969 (Wnormalized=): Use Enum and Reject Negative.
1970 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
1971
b660d3c6 19722014-09-08 Joseph Myers <joseph@codesourcery.com>
1973
1974 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
1975 digits of floating-point modes if -fbuilding-libgcc.
1976
325b8c3c 19772014-09-05 Joseph Myers <joseph@codesourcery.com>
1978
1979 * c-cppbuiltin.c (c_cpp_builtins): Also define
1980 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
1981 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
1982 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
1983 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
1984 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
1985 __LIBGCC_STACK_GROWS_DOWNWARD__,
1986 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
1987 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
1988 __LIBGCC_DWARF_FRAME_REGISTERS__,
1989 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
1990 __LIBGCC_STACK_POINTER_REGNUM__ and
1991 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
1992 (builtin_define_with_value): Handle backslash-escaping in string
1993 macro values.
1994
1e074e77 19952014-09-05 Richard Biener <rguenther@suse.de>
1996
1997 PR middle-end/63148
1998 * c-format.c (check_format_arg): Properly handle
1999 effectively signed POINTER_PLUS_EXPR offset.
2000
04afd878 20012014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
2002
2003 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
2004 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
2005 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
2006 and Init.
2007 * c-opts.c (c_common_handle_option): Do not handle here.
2008 (sanitize_cpp_opts): Likewise.
2009 * c-common.c (struct reason_option_codes_t): Handle
2010 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
2011
a3f448f0 20122014-09-03 Marek Polacek <polacek@redhat.com>
2013
2014 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
2015
40750995 20162014-09-02 Jakub Jelinek <jakub@redhat.com>
2017 Balaji V. Iyer <balaji.v.iyer@intel.com>
2018 Igor Zamyatin <igor.zamyatin@intel.com>
2019
2020 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
2021 * c-common.c (c_common_reswords): Added _Cilk_for.
2022 * c-common.h (enum rid): Added RID_CILK_FOR.
2023 (cilk_for_number_of_iterations): Add declaration.
2024 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
2025 CILK_FOR.
2026 * c-pragma.c (init_pragma): Register "grainsize" pragma.
2027 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
2028
f0fbe519 20292014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2030
2031 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
2032 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
2033 Wundef): Use CPP, Var and Init.
2034 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
2035
a7d2e480 20362014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2037
2038 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
2039 * c-opts.c (c_common_handle_option): Do not handle here.
2040
c35e53f1 20412014-08-25 Jason Merrill <jason@redhat.com>
2042
2043 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
2044 -std=c++14 and -std=gnu++14, rather than the reverse.
2045 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
2046 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
2047 * c-common.h (cxx_dialect): Remove cxx1y.
2048
4e454776 20492014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
2050
2051 * c-common.h (enum cxx_dialect): Add cxx14.
2052 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
2053 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
2054 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
2055
af1a80f2 20562014-08-22 Jason Merrill <jason@redhat.com>
2057
2058 * c.opt (std=gnu++17): Fix alias.
2059
dc6229e8 20602014-08-22 Marek Polacek <polacek@redhat.com>
2061
2062 PR c++/62199
2063 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
2064 check for vector types. Drop LHS argument.
2065 * c-common.h (warn_logical_not_parentheses): Adjust.
2066
ba7f7c88 20672014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
2068
2069 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
2070 (Wmultichar): Likewise.
2071 (Wdate-time): Use C-family languages instead of Common. Use CPP
2072 and Var.
2073 * c-opts.c (c_common_handle_option): Do not handle the above
2074 options here.
2075 (sanitize_cpp_opts): Likewise.
2076
399d4f80 20772014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
2078
2079 PR fortran/44054
2080 * c-opts.c: Include tree-diagnostics.h.
2081 (c_diagnostic_finalizer): New.
2082 (c_common_initialize_diagnostics): Use it.
2083
1babed5f 20842014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
2085
2086 PR preprocessor/51303
2087 * c-common.c (struct reason_option_codes_t option_codes):
2088 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
2089
3636964b 20902014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
2091
2092 PR c/60975
2093 PR c/53063
2094 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
2095 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
2096 (c_common_post_options): Call init_global_opts_from_cpp.
2097 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
2098
78bf4156 20992014-08-19 Marek Polacek <polacek@redhat.com>
2100
2101 PR c++/62153
2102 * c-common.c (maybe_warn_bool_compare): New function.
2103 * c-common.h (maybe_warn_bool_compare): Declare.
2104 * c.opt (Wbool-compare): New option.
2105
508ea33a 21062014-08-19 Marek Polacek <polacek@redhat.com>
2107
2108 * c.opt (Wc99-c11-compat): New option.
2109
806fe15e 21102014-08-19 Marek Polacek <polacek@redhat.com>
2111
2112 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
2113 to warn_c90_c99_compat.
2114 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
2115 to -1.
2116
6c867de1 21172014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
2118 Steven Bosscher <steven@gcc.gnu.org>
2119
2120 PR c/52952
2121 * c-format.c: Add extra_arg_loc and format_string_loc to struct
2122 format_check_results.
2123 (check_function_format): Use true and add comment for boolean
2124 argument.
2125 (finish_dollar_format_checking): Use explicit location when warning.
2126 (check_format_info): Likewise.
2127 (check_format_arg): Set extra_arg_loc and format_string_loc.
2128 (check_format_info_main): Use explicit location when warning.
2129 (check_format_types): Pass explicit location.
2130 (format_type_warning): Likewise.
2131
dc8078a3 21322014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
2133
2134 PR fortran/44054
2135 * c-format.c: Handle Fortran flags.
2136
d271ec7e 21372014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
2138
2139 PR other/61962
2140 * array-notation-common.c (find_rank): Added handling for other
2141 types of references.
2142
890c2e2f 21432014-08-10 Marek Polacek <polacek@redhat.com>
2144
2145 PR c/51849
2146 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
2147 * c.opt (Wc90-c99-compat): Add option.
2148
7149db5f 21492014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2150
2151 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
2152
2d2f6a15 21532014-08-03 Marek Polacek <polacek@redhat.com>
2154
2155 * c-common.c (check_case_value): Add location_t parameter. Use it.
2156 (c_add_case_label): Pass loc to check_case_value.
2157
06ecf488 21582014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2159
2160 * cilk.c: Use hash_map instead of pointer_map.
2161
431205b7 21622014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2163
2164 * c-gimplify.c: Use hash_set instead of pointer_set.
2165
3394c80c 21662014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2167
2168 PR middle-end/61455
2169 * array-notation-common.c (extract_array_notation_exprs): Handling
2170 of DECL_EXPR added.
2171
392dee1e 21722014-08-01 Jakub Jelinek <jakub@redhat.com>
2173
2174 * c-common.h (min_align_of_type): Removed prototype.
2175 * c-common.c (min_align_of_type): Removed.
2176 * c-ubsan.h (ubsan_maybe_instrument_reference,
2177 ubsan_maybe_instrument_member_call): New prototypes.
2178 * c-ubsan.c: Include stor-layout.h and builtins.h.
2179 (ubsan_maybe_instrument_reference_or_call,
2180 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
2181 functions.
2182
f22a2cb7 21832014-07-31 Marc Glisse <marc.glisse@inria.fr>
2184
2185 PR c++/60517
2186 * c.opt (-Wreturn-local-addr): Move to common.opt.
2187
87b0198f 21882014-07-30 Jason Merrill <jason@redhat.com>
2189
2190 PR c++/61659
2191 PR c++/61687
2192 Revert:
2193 * c.opt (-fuse-all-virtuals): New.
2194
74691f46 21952014-07-30 Tom Tromey <tromey@redhat.com>
2196
2197 PR c/59855
2198 * c.opt (Wdesignated-init): New option.
2199 * c-common.c (c_common_attribute_table): Add "designated_init".
2200 (handle_designated_init): New function.
2201
9140d56f 22022014-07-24 Marek Polacek <polacek@redhat.com>
2203
2204 PR c/57653
2205 * c-opts.c (c_finish_options): If -imacros is in effect, return.
2206
a09c5cc2 22072014-07-16 Dodji Seketeli <dodji@redhat.com>
2208
2209 PR preprocessor/60723 - missing system-ness marks for macro tokens
2210 * c-ppoutput.c (struct print::prev_was_system_token): New data
2211 member.
2212 (init_pp_output): Initialize it.
2213 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
2214 (do_line_change): Return a flag saying if a line marker was
2215 emitted or not.
2216 (scan_translation_unit): Detect if the system-ness of the token we
2217 are about to emit is different from the one of the previously
2218 emitted token. If so, emit a line marker. Avoid emitting useless
2219 adjacent line markers. Avoid emitting line markers for tokens
2220 originating from the expansion of built-in macros.
2221 (scan_translation_unit_directives_only): Adjust.
2222
2b25b62f 22232014-07-15 Marek Polacek <polacek@redhat.com>
2224
2225 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
2226 TYPE_MAX_VALUE is NULL.
2227
305d96bc 22282014-07-14 Jakub Jelinek <jakub@redhat.com>
2229
2230 PR middle-end/61294
2231 * c.opt (Wmemset-transposed-args): New warning.
2232
8ea4660d 22332014-07-10 Jason Merrill <jason@redhat.com>
2234
2235 PR c++/61659
2236 PR c++/61687
2237 * c.opt (-fuse-all-virtuals): New.
2238
cd480f3d 22392014-07-09 Richard Biener <rguenther@suse.de>
2240
2241 PR c-family/61741
2242 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
2243 using unsigned arithmetic if overflow does not wrap instead of
2244 if overflow is undefined.
2245
87d59e72 22462014-07-06 Marek Polacek <polacek@redhat.com>
2247
2248 PR c/6940
2249 * c.opt (Wsizeof-array-argument): New option.
2250
d69521d8 22512014-07-03 Jakub Jelinek <jakub@redhat.com>
2252
8204c077 2253 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
d69521d8 2254 comments->count <= 1, as comments->entries might be NULL.
2255
1207866e 22562014-07-01 Marek Polacek <polacek@redhat.com>
2257
2258 * c.opt (Wint-conversion): New option.
2259
7a6bbb76 22602014-07-01 Marek Polacek <polacek@redhat.com>
2261
2262 PR c/58286
2263 * c.opt (Wincompatible-pointer-types): New option.
2264
9d4eeb52 22652014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
2266
2267 PR c++/51400
2268 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
2269 Do not discard TYPE_QUALS of type.
2270
4b53bc0f 22712014-06-26 Jason Merrill <jason@redhat.com>
2272
2273 * c-common.h (enum cxx_dialect): Add cxx1z.
2274 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
2275 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
2276
a8a8d4ea 22772014-06-26 Teresa Johnson <tejohnson@google.com>
2278
2279 * c-common.h (get_dump_info): Declare.
2280 * c-gimplify.c (c_genericize): Use saved dump files.
2281 * c-opts.c (c_common_parse_file): Begin and end dumps
2282 once around parsing invocation.
2283 (get_dump_info): New function.
2284
1f6be080 22852014-06-23 Marek Polacek <polacek@redhat.com>
2286 Andrew MacLeod <amacleod@redhat.com>
2287
2288 PR c/61553
2289 * c-common.c (get_atomic_generic_size): Don't segfault if the
2290 type doesn't have a size.
2291
5ef6b660 22922014-06-20 Marek Polacek <polacek@redhat.com>
2293
2294 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
2295 (ubsan_walk_array_refs_r): New function.
2296 (c_genericize): Instrument array bounds.
2297 * c-ubsan.c: Include "internal-fn.h".
2298 (ubsan_instrument_division): Mark instrumented arrays as having
2299 side effects. Adjust ubsan_type_descriptor call.
2300 (ubsan_instrument_shift): Likewise.
2301 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
2302 (ubsan_instrument_bounds): New function.
2303 (ubsan_array_ref_instrumented_p): New function.
2304 (ubsan_maybe_instrument_array_ref): New function.
2305 * c-ubsan.h (ubsan_instrument_bounds): Declare.
2306 (ubsan_array_ref_instrumented_p): Declare.
2307 (ubsan_maybe_instrument_array_ref): Declare.
2308
23092014-06-20 Hale Wang <hale.wang@arm.com>
3ccd1e6e 2310
2311 PR lto/61123
2312 * c.opt (fshort-enums): Add to LTO.
2313 * c.opt (fshort-wchar): Likewise.
2314
78438f31 23152014-06-16 Marek Polacek <polacek@redhat.com>
2316
2317 PR c/60439
2318 * c.opt (Wswitch-bool): Add Var.
2319
5fddcf34 23202014-06-12 Jakub Jelinek <jakub@redhat.com>
2321
2322 PR middle-end/61486
2323 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
2324 #pragma omp target teams or
2325 #pragma omp {,target }teams distribute simd.
2326
74b777e5 23272014-06-12 Jason Merrill <jason@redhat.com>
2328
2329 * c.opt (Wabi=, fabi-compat-version): New.
2330 * c-opts.c (c_common_handle_option): Handle -Wabi=.
2331 (c_common_post_options): Handle flag_abi_compat_version default.
2332 Disallow -fabi-compat-version=1.
2333 * c-common.h (abi_version_crosses): New.
2334
738a6bda 23352014-06-11 Jan Hubicka <hubicka@ucw.cz>
2336
1f78217c 2337 * c-common.c (handle_section_attribute): Update handling for
738a6bda 2338 section names that are no longer trees.
2339
cf5f881f 23402014-06-10 Jakub Jelinek <jakub@redhat.com>
2341
2342 PR fortran/60928
2343 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
2344 (omp_pragmas): ... back here.
2345
32dc1512 23462014-06-05 Marek Polacek <polacek@redhat.com>
2347
2348 PR c/49706
2349 * c-common.c (warn_logical_not_parentheses): New function.
2350 * c-common.h (warn_logical_not_parentheses): Declare.
2351 * c.opt (Wlogical-not-parentheses): New option.
2352
f61a9bc2 23532014-06-04 Marek Polacek <polacek@redhat.com>
2354
2355 PR c/30020
2356 * c-common.c (check_case_bounds): Add location parameter.
2357 Use it.
2358 (c_add_case_label): Pass loc to check_case_bounds.
2359
c69ec07d 23602014-06-03 Marek Polacek <polacek@redhat.com>
2361
2362 PR c/60439
2363 * c.opt (Wswitch-bool): New option.
2364
3c77ca67 23652014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2366
68a2c870 2367 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
2368 Remove prototypes.
2369 (record_types_used_by_current_var_decl): Move prototype to where
2370 it belongs.
2371
3c77ca67 2372 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
2373 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
2374 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
2375
3ab4693e 23762014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2377
2378 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
2379 * c-common.c (c_common_nodes_and_builtins): Don't initialize
2380 void_zero_node.
2381 * c-pretty-print.c (pp_c_void_constant): New function.
2382 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
2383 (c_pretty_printer::expression): Handle VOID_CST.
2384 * cilk.c (extract_free_variables): Likewise.
2385 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
2386 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
2387
25a27413 23882014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2389
2390 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
2391 * c-pragma.c (push_alignment): Adjust.
2392 (handle_pragma_push_options): Likewise.
2393
3e5a8b00 23942014-05-09 Marek Polacek <polacek@redhat.com>
2395
2396 PR c/50459
2397 * c-common.c (check_user_alignment): Return -1 if alignment is error
2398 node.
2399 (handle_aligned_attribute): Don't call default_conversion on
2400 FUNCTION_DECLs.
2401 (handle_vector_size_attribute): Likewise.
2402 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
2403 (handle_sentinel_attribute): Call default_conversion and allow even
2404 integral types as an argument.
2405
c2c4ae8d 24062014-05-08 Marek Polacek <polacek@redhat.com>
2407
2408 PR c/61053
2409 * c-common.c (min_align_of_type): New function factored out from...
2410 (c_sizeof_or_alignof_type): ...here.
2411 * c-common.h (min_align_of_type): Declare.
2412
2026249a 24132014-05-08 Marek Polacek <polacek@redhat.com>
2414
2415 PR c/61077
2416 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
2417 parameter type of main.
2418
33c8dcfe 24192014-05-07 DJ Delorie <dj@redhat.com>
2420
2421 * c-cppbuiltin.c (print_bits_of_hex): New.
2422 (builtin_define_type_minmax): Print values using hex so as not to
2423 require a pre-computed list of string values.
2424
960d5a55 24252014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2426 Mike Stump <mikestump@comcast.net>
2427 Richard Sandiford <rdsandiford@googlemail.com>
2428
2429 * c-ada-spec.c: Include wide-int.h.
2430 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
2431 (dump_generic_ada_node): Use wide-int interfaces.
2432 * c-common.c: Include wide-int-print.h.
2433 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
2434 (pointer_int_sum): Use wide-int interfaces.
2435 (c_common_nodes_and_builtins): Use make_int_cst.
2436 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
2437 (handle_alloc_size_attribute): Use wide-int interfaces.
2438 (get_nonnull_operand): Likewise.
2439 * c-format.c (get_constant): Use tree_fits_uhwi_p.
2440 * c-lex.c: Include wide-int.h.
2441 (narrowest_unsigned_type): Take a widest_int rather than two
2442 HOST_WIDE_INTs.
2443 (narrowest_signed_type): Likewise.
2444 (interpret_integer): Update accordingly. Use wide-int interfaces.
2445 (lex_charconst): Use wide-int interfaces.
2446 * c-pretty-print.c: Include wide-int.h.
2447 (pp_c_integer_constant): Use wide-int interfaces.
2448 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
2449 INT_CST_LT_UNSIGNED.
2450
bbb88b31 24512014-05-06 Richard Biener <rguenther@suse.de>
2452
2453 * c-opts.c (c_common_post_options): For -freestanding,
2454 -fno-hosted and -fno-builtin disable pattern recognition
2455 if not enabled explicitely.
2456
022d4718 24572014-05-02 Marek Polacek <polacek@redhat.com>
2458
2459 * c.opt (Wsizeof-pointer-memaccess): Describe option.
2460
e4ab2ef3 24612014-05-01 Marek Polacek <polacek@redhat.com>
2462
2463 PR c/43245
2464 * c.opt (Wdiscarded-qualifiers): Add.
2465
52cc0072 24662014-04-30 Marek Polacek <polacek@redhat.com>
2467
2468 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
2469 INT_MIN / -1 sanitization only for integer types.
2470
4a026b48 24712014-04-25 Marek Polacek <polacek@redhat.com>
2472
2473 PR c/18079
2474 * c-common.c (handle_noinline_attribute): Warn if the attribute
2475 conflicts with always_inline attribute.
2476 (handle_always_inline_attribute): Warn if the attribute conflicts
2477 with noinline attribute.
2478
90e645fa 24792014-04-25 Marek Polacek <polacek@redhat.com>
2480
2481 PR c/60156
2482 * c-common.c (check_main_parameter_types): Warn about variadic main.
2483
db103ea4 24842014-04-24 Mike Stump <mikestump@comcast.net>
2485
2486 * c.opt (Wshadow-ivar): Default to on.
2487
06511efd 24882014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
2489
2490 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
2491
cdf34fca 24922014-04-23 Marek Polacek <polacek@redhat.com>
2493
2494 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
2495
7311d7c1 24962014-04-22 Jakub Jelinek <jakub@redhat.com>
2497
2498 PR sanitizer/60275
2499 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
2500 if flag_sanitize_undefined_trap_on_error.
2501 (ubsan_instrument_division, ubsan_instrument_shift,
2502 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
2503 if !flag_sanitize_recover.
2504
c1917557 25052014-04-22 Marc Glisse <marc.glisse@inria.fr>
2506
2507 PR libstdc++/43622
2508 * c-common.c (registered_builtin_types): Make non-static.
2509 * c-common.h (registered_builtin_types): Declare.
2510
b2ca6510 25112014-04-14 Richard Biener <rguenther@suse.de>
2512 Marc Glisse <marc.glisse@inria.fr>
2513
2514 PR c/60819
2515 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
2516 apply may-alias the scalar pointer type when applicable.
2517
855372a3 25182014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2519
2520 PR middle-end/60467
2521 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
2522 as possible argument for Cilk_spawn.
2523
4012a986 25242014-04-11 Tobias Burnus <burnus@net-b.de>
2525
2526 PR c/60194
2527 * c.opt (Wformat-signedness): Add
2528 * c-format.c(check_format_types): Use it.
2529
0d284870 25302014-04-11 Jason Merrill <jason@redhat.com>
2531
2532 PR c++/57926
2533 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
2534 default_conversion for an array argument.
2535
a34c1231 25362014-04-08 Marek Polacek <polacek@redhat.com>
2537
2538 PR sanitizer/60745
2539 * c-ubsan.c: Include asan.h.
2540 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
2541
a35a8e18 25422014-04-03 Nathan Sidwell <nathan@codesourcery.com>
2543
2544 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
2545
b23e42b6 25462014-04-02 Marek Polacek <polacek@redhat.com>
2547
2548 * c-common.h (c_expand_expr): Remove declaration.
2549
5a672e62 25502014-03-28 Jakub Jelinek <jakub@redhat.com>
2551
2552 PR c++/60689
2553 * c-common.c (add_atomic_size_parameter): When creating new
2554 params vector, push the size argument first.
2555
d4d068c0 25562014-03-26 Jakub Jelinek <jakub@redhat.com>
2557
2558 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
2559 ubsan_instrument_vla, ubsan_instrument_return): Adjust
2560 ubsan_create_data callers.
2561
446bdf5f 25622014-03-22 Jakub Jelinek <jakub@redhat.com>
2563
2564 PR debug/60603
2565 * c-opts.c (c_finish_options): Restore cb_file_change call to
2566 <built-in>.
2567
8895f0a3 25682014-03-13 Jakub Jelinek <jakub@redhat.com>
2569
2570 PR middle-end/36282
2571 * c-pragma.c (apply_pragma_weak): Only look at
2572 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
2573 DECL_ASSEMBLER_NAME_SET_P (decl).
2574 (maybe_apply_pending_pragma_weaks): Exit early if
2575 vec_safe_is_empty (pending_weaks) rather than only when
2576 !pending_weaks.
2577 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
2578 set assembler name back to NULL afterwards.
2579
7a5da2cd 25802014-03-11 Jason Merrill <jason@redhat.com>
2581
2582 * c.opt: Add -std=gnu++14.
2583
95093889 25842014-03-11 Ian Bolton <ian.bolton@arm.com>
2585
2586 * c-opts.c (c_common_post_options): Don't override
2587 -ffp-contract=fast if unsafe-math-optimizations is on.
2588
c9a24b37 25892014-03-08 Paulo Matos <paulo@matos-sorge.com>
2590
2591 * c.opt: Enable LTO FE for fshort-double.
2592
3f6dba6e 25932014-03-07 Jason Merrill <jason@redhat.com>
2594
2595 * c.opt: Add -std=c++14.
2596
3bfdc94f 25972014-03-06 Marek Polacek <polacek@redhat.com>
2598
2599 PR c/60197
2600 * cilk.c (contains_cilk_spawn_stmt): New function.
2601 (contains_cilk_spawn_stmt_walker): Likewise.
2602 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
2603 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
2604
8b3a6a4c 26052014-03-03 Jakub Jelinek <jakub@redhat.com>
2606
2607 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
2608 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
2609 even when flag_preprocess_only.
2610
734ec290 26112014-02-26 Jason Merrill <jason@redhat.com>
2612
2613 PR c++/59231
2614 PR c++/11586
2615 * c-common.c (shorten_compare): Don't check
2616 c_inhibit_evaluation_warnings.
2617
81aec8b8 26182014-02-19 Jakub Jelinek <jakub@redhat.com>
2619
d1081017 2620 PR c/37743
2621 * c-common.c (c_common_nodes_and_builtins): When initializing
2622 c_uint{16,32,64}_type_node, also set corresponding
2623 uint{16,32,64}_type_node to the same value.
2624
81aec8b8 2625 PR c++/60267
2626 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
2627 for PRAGMA_IVDEP if flag_preprocess_only.
2628
312243bb 26292014-02-12 Jakub Jelinek <jakub@redhat.com>
2630
2631 PR c/60101
2632 * c-common.c (merge_tlist): If copy is true, call new_tlist,
2633 if false, add ADD itself, rather than vice versa.
2634 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
2635 copy. For SAVE_EXPR, only call merge_tlist once.
2636
237e78b1 26372014-02-08 Jakub Jelinek <jakub@redhat.com>
2638
2639 PR middle-end/60092
2640 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
2641 and tree_to_uhwi.
2642 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
2643 functions.
2644 (c_common_attribute_table): Add alloc_align and assume_aligned
2645 attributes.
2646
76fdceeb 26472014-02-06 Marek Polacek <polacek@redhat.com>
2648
2649 PR c/60087
2650 * c-common.c (warn_for_sign_compare): Call warning_at with location
2651 instead of warning.
2652
4a4dea42 26532014-02-05 Marek Polacek <polacek@redhat.com>
2654
2655 PR c/53123
2656 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
2657 statement.
2658
ec704957 26592014-02-04 Marek Polacek <polacek@redhat.com>
2660
2661 PR c/60036
2662 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
2663 SAVE_EXPR.
2664
caf62483 26652014-02-03 Marc Glisse <marc.glisse@inria.fr>
2666
2667 PR c++/53017
2668 PR c++/59211
2669 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
2670 handle_vector_size_attribute, handle_nonnull_attribute): Call
2671 default_conversion on the attribute argument.
2672 (handle_nonnull_attribute): Increment the argument number.
2673
ec761d5a 26742014-01-31 Marek Polacek <polacek@redhat.com>
2675
2676 PR c/59963
2677 * c-common.c (add_atomic_size_parameter): Pass vNULL to
2678 build_function_call_vec.
2679 (resolve_overloaded_builtin): Likewise.
2680 * c-common.h (build_function_call_vec): Adjust declaration.
2681
22a75734 26822014-01-30 Marek Polacek <polacek@redhat.com>
2683
2684 PR c/59940
2685 * c-common.h (unsafe_conversion_p): Adjust declaration.
2686 (warnings_for_convert_and_check): Likewise.
2687 (convert_and_check): Likewise.
2688 * c-common.c (unsafe_conversion_p): Add location parameter. Call
2689 expansion_point_location_if_in_system_header on it.
2690 (warnings_for_convert_and_check): Add location parameter. Call
2691 expansion_point_location_if_in_system_header on it. Use it.
2692 (convert_and_check): Add location parameter. Use it.
2693 (conversion_warning): Likewise.
2694 (c_add_case_label): Adjust convert_and_check calls.
2695 (scalar_to_vector): Adjust unsafe_conversion_p calls.
2696
a89e6c15 26972014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2698
2699 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
2700 flag_cilkplus.
2701 * c-pragma.c (init_pragma): Likewise.
2702 * c.opt: Likewise.
2703
2623625f 27042014-01-23 Marek Polacek <polacek@redhat.com>
2705
2706 PR c/59846
2707 * c-common.c (shorten_compare): Add location_t parameter.
2708 * c-common.h (shorten_binary_op): Adjust declaration.
2709
46da3601 27102014-01-23 Marek Polacek <polacek@redhat.com>
2711
2712 PR c/58346
2713 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
2714 * c-common.h: Declare it.
2715
c9743c6a 27162014-01-20 Eric Botcazou <ebotcazou@adacore.com>
2717
2718 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
2719 * c-ada-spec.c (dump_ads): Likewise.
2720 (cpp_check): Likewise.
2721 (dump_ada_specs): Likewise.
2722
27232014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
36e33c6a 2724
2725 PR c++/49718
2726 * c-common.c (handle_no_instrument_function_attribute): Allow
2727 no_instrument_function attribute in class member
2728 definition/declaration.
2729
1248c663 27302014-01-15 Jakub Jelinek <jakub@redhat.com>
2731
2732 PR c/58943
2733 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
2734 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
2735 being COMPOUND_EXPR.
2736 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
2737 operand a SAVE_EXPR and second MODIFY_EXPR.
2738
6e5c480b 27392014-01-09 Jakub Jelinek <jakub@redhat.com>
2740
2741 PR target/58115
2742 * c-pch.c (c_common_write_pch): Call
2743 prepare_target_option_nodes_for_pch.
2744
3aea1f79 27452014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2746
2747 Update copyright years
2748
e4f22041 27492014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2750
2751 * array-notation-common.c, c-cilkplus.c: Use the standard form for
2752 the copyright notice.
2753
7fb0fe24 27542013-12-28 Eric Botcazou <ebotcazou@adacore.com>
2755
2756 * c-ada-spec.c (print_constructor): New function.
2757 (print_destructor): Retrieve the origin of the destructor.
2758 (print_ada_declaration): Revamp handling of constructors/destructors.
2759
468088ac 27602013-12-23 Stuart Hastings <stuart@apple.com>
2761 Bill Maddox <maddox@google.com>
2762 Jason Merrill <jason@redhat.com>
2763
2764 * c.opt: Add -fdeclone-ctor-dtor.
2765 * c-opts.c (c_common_post_options): Default to on iff -Os.
2766
74acc703 27672013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2768
2769 * c-common.c (c_common_attribute_table): Added "cilk simd function"
2770 attribute.
2771 * c-pragma.h (enum pragma_cilk_clause): Remove.
2772 (enum pragma_omp_clause): Added the following fields:
2773 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
2774 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
2775 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
2776 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
2777 PRAGMA_CILK_CLAUSE_UNIFORM.
2778
8204c077 2779
433e804e 27802013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2781
2782 * cilk.c (cilk_outline): Made this function non-static.
2783 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
2784 (create_cilk_wrapper): Added a new parameter: a function pointer.
2785 (c_install_body_w_frame_cleanup): Remove
2786 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
2787 * c-common.h (cilk_outline): New prototype.
2788 (gimplify_cilk_spawn): Removed two parameters.
2789 (cilk_install_body_with_frame_cleanup): New prototype.
2790 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
2791 CILK_SPAWN_STMT case.
2792
5bcc7e60 27932013-12-11 Bernd Schmidt <bernds@codesourcery.com>
2794
e66325ea 2795 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
2796
5bcc7e60 2797 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
2798 (int_array_type_node): Remove.
2799 * c-common.c (c_common_nodes_and_builtins): Don't build it.
2800
0b26ec77 28012013-12-05 Marek Polacek <polacek@redhat.com>
2802
2803 PR c/52023
2804 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
2805 [ADJUST_FIELD_ALIGN].
2806
a179a7dc 28072013-12-04 Joseph Myers <joseph@codesourcery.com>
2808
2809 PR c/52023
2810 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
2811 and check field alignment if set.
2812 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
2813 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
2814
8204c077 28152013-12-04 Jakub Jelinek <jakub@redhat.com>
137559b2 2816 Marek Polacek <polacek@redhat.com>
2817
2818 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
2819 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
2820
648fd348 28212013-11-29 H.J. Lu <hongjiu.lu@intel.com>
2822
2823 PR c/59309
2824 * cilk.c (gimplify_cilk_spawn): Properly handle function without
2825 arguments.
2826
253e1cae 28272013-11-29 Jakub Jelinek <jakub@redhat.com>
2828
2829 PR c/59280
2830 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
2831 goto invalid. If it is error_mark_node, don't issue further
2832 diagnostics.
2833
3e398f5b 28342013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
2835
2836 * c.opt (Wopenmp-simd): New.
2837
020bc656 28382013-11-22 Jakub Jelinek <jakub@redhat.com>
2839
2840 * c-ubsan.h (ubsan_instrument_return): New prototype.
2841 * c-ubsan.c (ubsan_instrument_return): New function.
2842
bc61cadb 28432013-11-22 Andrew MacLeod <amacleod@redhat.com>
2844
2845 * c-common.c: Add required include files from gimple.h.
2846 * c-gimplify.c: Likewise
2847 * cilk.c: Likewise
2848
3df42822 28492013-11-22 David Malcolm <dmalcolm@redhat.com>
2850
2851 * c-common.c (unsafe_conversion_p): Remove use of
2852 EXPR_LOC_OR_HERE macro.
2853 (conversion_warning): Likewise.
2854 (warnings_for_convert_and_check): Likewise.
2855 (warn_for_collisions_1): Likewise.
2856 (shorten_compare): Likewise, and remove use of in_system_header
2857 macro, using the location from the former.
2858 * c-lex.c (dump_one_header): Remove use of input_filename macro.
2859 (cb_def_pragma): Remove use of in_system_header macro.
2860 (lex_string): Likewise.
2861 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
2862
8c53c46c 28632013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
2864 Mike Stump <mikestump@comcast.net>
2865 Richard Sandiford <rdsandiford@googlemail.com>
2866
2867 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
2868 instead of TREE_INT_CST_LOW, in cases where there is a protecting
2869 tree_fits_shwi_p or tree_fits_uhwi_p.
2870 (dump_generic_ada_node): Likewise.
2871 * c-format.c (check_format_arg): Likewise.
2872 * c-pretty-print.c (pp_c_integer_constant): Likewise.
2873
5200ef07 28742013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
2875
2876 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
2877
ca9d7d74 28782013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
2879
2880 PR c/53001
2881 * c-common.c (unsafe_conversion_p): Make this function
2882 return an enumeration with more detail.
2883 (conversion_warning): Use the new return type of
2884 unsafe_conversion_p to separately warn either about conversions
2885 that lower floating point number precision or about the other
2886 kinds of conversions.
2887 * c-common.h (enum conversion_safety): New enumeration.
2888 (unsafe_conversion_p): switching return type to
2889 conversion_safety enumeration.
2890 * c.opt: Adding new warning -Wfloat-conversion and
2891 enabling it with -Wconversion.
2892
0391a567 28932013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
2894
2895 * c-opts.c: Include plugin.h.
2896 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
2897
19b928d9 28982013-11-19 Marek Polacek <polacek@redhat.com>
2899
2900 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
2901 call.
2902 (ubsan_instrument_shift): Likewise.
2903 (ubsan_instrument_vla): Likewise.
2904
aa59f000 29052013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2906
2907 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
2908 cast to unsigned type.
2909
08f817b3 29102013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2911
2912 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
2913 tree_low_cst.
2914 (complete_array_type): Update comment to refer to tree_to_[su]hwi
2915 rather than tree_low_cst.
2916
6a0712d4 29172013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2918
2919 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
2920 tree_to_uhwi throughout.
2921
fcb97e84 29222013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2923
2924 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
2925 tree_low_cst (..., 0) with tree_to_shwi throughout.
2926
cd4547bf 29272013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2928
2929 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
2930 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
2931
35ec552a 29322013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2933
2934 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
2935 host_integerp (..., 0) with tree_fits_shwi_p throughout.
2936
f2697631 29372013-11-15 Aldy Hernandez <aldyh@redhat.com>
2938
2939 * c-cilkplus.c: New file.
2940 * c-common.c (readonly_error): Add location argument.
2941 * c-common.h (readonly_error): Same.
2942 (c_finish_cilk_clauses): Protoize.
2943 (c_check_cilk_loop): Same.
2944 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
2945 Do not fail on error_mark_node.
2946 Abstract increment canonicalization to here...
2947 (c_omp_for_incr_canonicalize_ptr): New.
2948 c-pragma.c (init_pragma): Register "simd" pragma.
2949 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
2950 (enum pragma_cilk_clause): New.
2951
0aa8c34e 29522013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
2953
2954 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
2955 wchar_type and host_integerp checks.
2956
e795d6e1 29572013-11-14 Andrew MacLeod <amacleod@redhat.com>
2958
2959 * c-common.c: Likewise.
2960 * c-gimplify.c: Likewise.
2961 * cilk.c: Likewise.
2962
9ed99284 29632013-11-14 Diego Novillo <dnovillo@google.com>
2964
2965 * c-common.c: Include fold-const.h.
2966 Include stor-layout.h.
2967 Include calls.h.
2968 Include stringpool.h.
2969 Include attribs.h.
2970 Include varasm.h.
2971 Include trans-mem.h.
2972 * c-cppbuiltin.c: Include stor-layout.h.
2973 Include stringpool.h.
2974 * c-format.c: Include stringpool.h.
2975 * c-lex.c: Include stringpool.h.
2976 Include stor-layout.h.
2977 * c-pragma.c: Include stringpool.h.
2978 Include attribs.h.
2979 Include varasm.h.
2980 Include gcc-symtab.h.
2981 * c-pretty-print.c: Include stor-layout.h.
2982 Include attribs.h.
2983 * cilk.c: Include stringpool.h.
2984 Include calls.h.
2985
4fba5eb9 29862013-11-13 Joseph Myers <joseph@codesourcery.com>
2987
2988 * c-common.h (enum rid): Add RID_AUTO_TYPE.
2989 * c-common.c (c_common_reswords): Add __auto_type.
2990 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
2991
a8783bee 29922013-11-12 Andrew MacLeod <amacleod@redhat.com>
2993
e795d6e1 2994 * c-common.c: Include gimplify.h.
2995 * c-gimplify.c: Likewise.
2996 * cilk.c: Likewise.
2997 * c-omp.c: Include gimple-expr.h instead of gimple.h.
2998 * c-ubsan.c: Don't include gimple.h.
a8783bee 2999
d184e0c0 30002013-11-12 Joseph Myers <joseph@codesourcery.com>
3001
3002 * c-common.c (c_common_reswords): Add _Thread_local.
3003
a056826c 30042013-11-09 Joseph Myers <joseph@codesourcery.com>
3005
3006 * c-common.c (atomic_size_supported_p): New function.
3007 (resolve_overloaded_atomic_exchange)
3008 (resolve_overloaded_atomic_compare_exchange)
3009 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
3010 Use it instead of comparing size with a local list of sizes.
3011
b560fabd 30122013-11-07 Andrew MacLeod <amacleod@redhat.com>
3013 Joseph Myers <joseph@codesourcery.com>
3014
3015 * c-common.h (enum rid): Add RID_ATOMIC.
3016 * c-common.c (c_common_reswords): Add _Atomic.
3017 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
3018 (keyword_is_type_qualifier): Accept RID_ATOMIC.
3019 * c-format.c (check_format_types): Check for extra _Atomic
3020 qualifiers in format argument.
3021 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
3022 (pp_c_type_qualifier_list): Mention _Atomic in comment.
3023
5b1a0622 30242013-11-06 Tobias Burnus <burnus@net-b.de>
3025
3026 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
3027
4f8f4cb8 30282013-11-06 Joseph Myers <joseph@codesourcery.com>
3029
3030 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
3031 standards modes.
3032 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
3033 to mean lack of IEEE 754 support.
3034
9148bda3 30352013-11-05 Tobias Burnus <burnus@net-b.de>
3036
3037 * c.opt (-Wdate-time): New option
3038 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
3039
08c5f4d5 30402013-11-05 Joseph Myers <joseph@codesourcery.com>
3041
3042 * c-cppbuiltin.c (cpp_iec_559_value): Test
3043 flag_excess_precision_cmdline not flag_excess_precision.
3044
c630ef93 30452013-11-05 Tobias Burnus <burnus@net-b.de>
3046
3047 * c.opt (fopenmp-simd): New option.
3048 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
3049 (omp_pragmas): ... this new struct.
3050 (c_pp_lookup_pragma): Also walk omp_pragmas.
3051 (init_pragma): Init pragmas for -fopenmp-simd.
3052
7354a89b 30532013-11-04 Marek Polacek <polacek@redhat.com>
3054
3055 PR c++/58979
3056 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
3057
4c866b9b 30582013-11-04 Joseph Myers <joseph@codesourcery.com>
3059
3060 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
3061 New functions.
3062 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
3063
e2a6a333 30642013-11-04 Eric Botcazou <ebotcazou@adacore.com>
3065
3066 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
3067 (dump_ada_specs): Adjust prototype of second callback.
3068 * c-ada-spec.c (cpp_check): New global variable.
3069 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
3070 (print_generic_ada_decl): Likewise.
3071 (has_static_fields): Change return type to bool and add guard.
3072 (has_nontrivial_methods): New predicate.
3073 (is_tagged_type): Change return type to bool.
3074 (separate_class_package): Call has_nontrivial_methods.
3075 (pp_ada_tree_identifier): Minor tweaks.
3076 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
3077 (dump_ada_array_domains): Likewise.
3078 (dump_ada_array_type): Likewise.
3079 (dump_template_types): Remove cpp_check parameter and do not pass it to
3080 dump_generic_ada_node.
3081 (dump_ada_template): Likewise.
3082 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
3083 recursively.
3084 (print_ada_methods): Change return type to integer. Remove cpp_check
3085 parameter and do not pass it down.
3086 (dump_nested_types): Remove cpp_check parameter and do not pass it to
3087 dump_generic_ada_node.
3088 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
3089 accessing methods.
3090 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
3091 down. Use has_nontrivial_methods to recognize C++ classes. Use return
3092 value of print_ada_methods.
3093 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
3094 Set cpp_check to it before invoking dump_ada_nodes.
3095 (dump_ada_specs): Likewise.
3096
2c4c3477 30972013-11-03 Marek Polacek <polacek@redhat.com>
3098
3099 * c-ubsan.c: Don't include hash-table.h.
3100 (ubsan_instrument_vla): New function.
3101 * c-ubsan.h: Declare it.
3102
452659af 31032013-10-31 David Malcolm <dmalcolm@redhat.com>
3104
3105 Automated part of renaming of symtab_node_base to symtab_node.
3106
3107 Patch autogenerated by rename_symtab.py from
3108 https://github.com/davidmalcolm/gcc-refactoring-scripts
3109 revision 58bb219cc090b2f4516a9297d868c245495ee622
3110
3111 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
3112 symtab_node_base to symtab_node.
3113
4d6f7dd4 31142013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
3115
3116 Implement C++14 digit separators.
3117 * c-lex.c (interpret_float): Remove digit separators from scratch string
3118 before building real literal.
3119
06cfe805 31202013-10-30 Jakub Jelinek <jakub@redhat.com>
3121
3122 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
3123
d037099f 31242013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3125
3126 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
3127 fields.
3128 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
3129 enabled.
3130 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
3131 (insert_cilk_frame): New prototype.
3132 (cilk_init_builtins): Likewise.
3133 (gimplify_cilk_spawn): Likewise.
3134 (c_cilk_install_body_w_frame_cleanup): Likewise.
3135 (cilk_detect_spawn_and_unwrap): Likewise.
3136 (cilk_set_spawn_marker): Likewise.
3137 (build_cilk_sync): Likewise.
3138 (build_cilk_spawn): Likewise.
3139 * cilk.c: New file.
3140
02774f2d 31412013-10-29 David Malcolm <dmalcolm@redhat.com>
3142
3143 Patch autogenerated by refactor_symtab.py from
3144 https://github.com/davidmalcolm/gcc-refactoring-scripts
3145 revision 58bb219cc090b2f4516a9297d868c245495ee622
3146
3147 * c-gimplify.c (c_genericize): Update for conversion of symtab types
3148 to a true class hierarchy.
3149 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
3150
31fe10fd 31512013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
3152
3153 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
3154
b1c06ff9 31552013-10-26 Jeff Law <law@redhat.com>
3156
1f78217c 3157 * c-common.c (c_define_builtins): Remove mudflap support.
3158 * c.opt: Ignore and warn for mudflap options.
b1c06ff9 3159
48a972c8 31602013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 3161
3162 PR other/33426
3163 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
3164 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
3165
546a04b1 31662013-10-23 Jason Merrill <jason@redhat.com>
3167
3168 * c-format.c (gcc_cxxdiag_char_table): Add %X.
3169
bc7bff74 31702013-10-11 Jakub Jelinek <jakub@redhat.com>
3171
d62c713e 3172 * c-common.h (omp_clause_mask::operator !=): New method.
3173 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
3174 instead of if (mask & something) tests everywhere.
3175
bc7bff74 3176 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
3177 201307 instead of 201107.
3178 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
3179 (c_common_attribute_table): Add "omp declare target" and
3180 "omp declare simd" attributes.
3181 (handle_omp_declare_target_attribute,
3182 handle_omp_declare_simd_attribute): New functions.
3183 * c-omp.c: Include c-pragma.h.
3184 (c_finish_omp_taskgroup): New function.
3185 (c_finish_omp_atomic): Add swapped argument, if true,
3186 build the operation first with rhs, lhs arguments and use NOP_EXPR
3187 build_modify_expr.
3188 (c_finish_omp_for): Add code argument, pass it down to make_code.
3189 (c_omp_split_clauses): New function.
3190 (c_split_parallel_clauses): Removed.
3191 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
3192 c_omp_declare_simd_clauses_to_decls): New functions.
3193 * c-common.h (omp_clause_mask): New type.
3194 (OMP_CLAUSE_MASK_1): Define.
3195 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
3196 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
3197 omp_clause_mask::operator |, omp_clause_mask::operator &,
3198 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
3199 omp_clause_mask::operator ==): New methods.
3200 (enum c_omp_clause_split): New.
3201 (c_finish_omp_taskgroup): New prototype.
3202 (c_finish_omp_atomic): Add swapped argument.
3203 (c_finish_omp_for): Add code argument.
3204 (c_omp_split_clauses): New prototype.
3205 (c_split_parallel_clauses): Removed.
3206 (c_omp_declare_simd_clauses_to_numbers,
3207 c_omp_declare_simd_clauses_to_decls): New prototypes.
3208 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
3209 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
3210 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
3211 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
3212 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
3213 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
3214 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
3215 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
3216 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
3217 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
3218 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
3219 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
3220 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
3221 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
3222 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
3223 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
3224 PRAGMA_OMP_CLAUSE_UNIFORM.
3225
d7dcba40 32262013-10-09 Marc Glisse <marc.glisse@inria.fr>
3227
3228 PR tree-optimization/20318
3229 * c-common.c (handle_returns_nonnull_attribute): New function.
3230 (c_common_attribute_table): Add returns_nonnull.
3231
0b7282f1 32322013-10-03 Marc Glisse <marc.glisse@inria.fr>
3233
3234 PR c++/19476
3235 * c.opt (fcheck-new): Move to common.opt.
3236
51f553af 32372013-09-25 Marek Polacek <polacek@redhat.com>
3238 Jakub Jelinek <jakub@redhat.com>
3239
3240 PR sanitizer/58413
3241 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
3242 an expression if we can prove it is correct.
3243 (ubsan_instrument_division): Likewise. Remove unnecessary
3244 check.
3245
05f893e1 32462013-09-18 Marek Polacek <polacek@redhat.com>
3247
3248 PR sanitizer/58411
3249 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
3250 Declare it.
3251 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
3252
236ce1d1 32532013-09-14 Iain Sandoe <iain@codesourcery.com>
3254
3255 PR target/48094
3256 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
3257 fobjc-gc, freplace-objc-classes): Accept for LTO.
3258
f9f68d35 32592013-09-13 Jacek Caban <jacek@codeweavers.com>
3260
3261 * c-target.def: New hook
3262
ba2f764e 32632013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
3264
3265 PR c++/43452
3266 * c.opt (Wdelete-incomplete): Add.
3267
73437615 32682013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3269
3270 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
3271 (vector_types_compatible_elements_p): New function.
3272 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
3273 declaration.
3274 (vector_types_compatible_elements_p): Declare.
3275
95af4c75 32762013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3277
3278 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
3279 a virtual member function.
3280 (pp_simple_type_specifier): Remove.
3281 (pp_c_type_specifier): Likewise.
3282 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
3283 Rename from pp_c_type_specifier. Adjust.
3284 (c_pretty_printer::c_pretty_printer): Do not assign to
3285 simple_type_specifier.
3286
eaab24b9 32872013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3288
3289 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
3290 member function.
3291 (c_pretty_printer::storage_class_specifier): Likewise.
3292 (c_pretty_printer::initializer): Likewise.
3293 (pp_declaration): Remove.
3294 (pp_declaration_specifiers): Likewise.
3295 (pp_abstract_declarator): Likewise.
3296 (pp_declarator): Likewise.
3297 (pp_type_id): Likewise.
3298 (pp_statement): Likewise.
3299 (pp_constant): Likewise.
3300 (pp_id_expression): Likewise.
3301 (pp_primary_expression): Likewise.
3302 (pp_unary_expression): Likewise.
3303 (pp_multiplicative_expression): Likewise.
3304 (pp_conditional_expression): Likewise.
3305 (pp_assignment_expression): Likewise.
3306 (pp_expression): Likewise.
3307 (pp_c_type_id): Likewise.
3308 (pp_c_storage_class_specifier): Likewise.
3309 * c-pretty-print.c (pp_c_type_cast): Tidy.
3310 (pp_c_pointer): Likewise.
3311 (pp_c_type_specifier): Likewise.
3312 (pp_c_parameter_type_list): Likewise.
3313 (pp_c_function_definition): Likewise.
3314 (pp_c_init_declarator): Likewise.
3315 (pp_c_initializer_list): Likewise.
3316 (pp_c_constructor_elts): Likewise.
3317 (c_pretty_printer::direct_abstract_declarator): Likewise.
3318 (c_pretty_printer::declaration_specifiers): Likewise.
3319 (c_pretty_printer::primary_expression): Likewise.
3320 (c_pretty_printer::postfix_expression): Likewise.
3321 (c_pretty_printer::type_id): Rename from pp_c_type_id.
3322 (c_pretty_printer::storage_class_specifier): Rename from
3323 pp_c_storage_class_specifier.
3324 (c_pretty_printer::initializer): Rename from pp_c_initializer.
3325 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
3326 storage_class_specifier, initializer, offset_list, flags.
3327
9e46467d 33282013-08-30 Marek Polacek <polacek@redhat.com>
3329
3330 * c-ubsan.c: New file.
3331 * c-ubsan.h: New file.
3332
36a8d9b9 33332013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3334
3335 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
3336 member function.
3337 (c_pretty_printer::declaration_specifiers): Likewise.
3338 (c_pretty_printer::declarator): Likewise.
3339 (c_pretty_printer::abstract_declarator): Likewise.
3340 (c_pretty_printer::direct_abstract_declarator): Likewise.
3341 (c_pretty_printer::direct_declarator): Likewise.
3342 (c_pretty_printer::function_specifier): Likewise.
3343 (pp_declaration): Adjust.
3344 (pp_declaration_specifiers): Likewise.
3345 (pp_abstract_declarator): Likewise.
3346 (pp_direct_declarator): Likewise.
3347 (pp_function_specifier): Likewise.
3348 (pp_direct_abstract_declarator): Remove as unused.
3349 (pp_c_declaration): Remove.
3350 (pp_c_declaration_specifiers): Likewise.
3351 (pp_c_declarator): Likewise.
3352 (pp_c_direct_declarator): Likewise.
3353 (pp_c_function_specifier): Likewise.
3354 (pp_c_direct_abstract_declarator): Likewise.
3355 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
3356 from pp_c_abstract_declarator. Adjust.
3357 (c_pretty_printer::direct_abstract_declarator): Rename from
3358 pp_c_direct_abstract_declarator. Adjust.
3359 (c_pretty_printer::function_specifier): Rename from
3360 pp_c_function_specifier. Adjust.
3361 (c_pretty_printer::declaration_specifiers): Rename from
3362 pp_c_declaration_specifiers. Adjust.
3363 (c_pretty_printer::direct_declarator): Rename from
3364 pp_c_direct_declarator. Adjust.
3365 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
3366 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
3367 (c_pretty_printer::c_pretty_printer): Do not assign to
3368 declaration, declaration_specifiers, declarator,
3369 direct_declarator, direct_abstract_declarator, function_specifier.
3370
30635c2e 33712013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
3372
3373 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
3374 virtual member function.
3375 (c_pretty_printer::multiplicative_expression): Likewise.
3376 (c_pretty_printer::conditional_expression): Likewise.
3377 (c_pretty_printer::assignment_expression): Likewise.
3378 (c_pretty_printer::expression): Likewise.
3379 (pp_unary_expression): Adjust.
3380 (pp_multiplicative_expression): Likewise.
3381 (pp_assignment_expression): Likewise.
3382 (pp_conditional_expression): Likewise.
3383 (pp_expression): Likewise.
3384 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
3385 from pp_c_unary_expression. Adjust.
3386 (c_pretty_printer::multiplicative_expression): Rename from
3387 pp_c_multiplicative_expression. Adjust.
3388 (c_pretty_printer::conditional_expression): Rename from
3389 pp_c_conditional_expression. Adjust.
3390 (c_pretty_printer::assignment_expression): Rename from
3391 pp_c_assignment_expression. Adjust.
3392 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
3393 (c_pretty_printer::c_pretty_printer): Do not assign to
3394 unary_expression, multiplicative_expression,
3395 conditional_expression, expression.
3396
027d08ed 33972013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
3398
3399 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
3400 virtual member function.
3401 (pp_postfix_expression): Adjust.
3402 (pp_c_postfix_expression): Remove.
3403 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
3404 from pp_c_postfix_expression. Adjust.
3405 (c_pretty_printer::c_pretty_printer): Do not assign to
3406 postfix_expression.
3407
f873303a 34082013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
3409
3410 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
3411 virtua member function.
3412 (pp_primary_expression): Adjust.
3413 (pp_c_primary_expression): Remove.
3414 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
3415 from pp_c_primary_expression. Adjust.
3416 (pp_c_initializer_list): Use pp_primary_expression.
3417 (c_pretty_printer::c_pretty_printer): Do not assign to
3418 primary_expression.
3419
08e3e481 34202013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
3421
3422 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
3423 * c-pretty-print.c (M_): Remove.
3424 (c_pretty_printer::translate_string): Define.
3425 (pp_c_type_specifier): Use it.
3426 (pp_c_primary_expression): Likewise.
3427 (pp_c_expression): Likewise.
3428
1fc4a87f 34292013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
3430
3431 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
3432 virtual function.
3433 (pp_c_id_expression): Remove.
3434 (pp_id_expression): Adjust.
3435 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
3436 pp_c_id_expression. Adjust.
3437 (pp_c_postfix_expression): Use pp_id_expression.
3438 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
3439
a6cb161b 34402013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
3441
3442 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
3443 member function.
3444 (pp_constant): Adjust.
3445 (pp_c_constant): Remove.
3446 * c-pretty-print.c (c_pretty_printer::constant): Rename from
3447 pp_c_constant. Adjust.
3448 (pp_c_constant)
3449 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
3450 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
3451
eed6bc21 34522013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3453
3454 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
3455 (c_pretty_printer::c_pretty_printer): Declare.
3456 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
3457 c_pretty_printer_init. Adjust.
3458 (print_c_tree): Do not call c_pretty_printer_init.
3459 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
3460
df558d2e 34612013-08-09 Arnaud Charlet <charlet@adacore.com>
3462
3463 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
3464
42f9a786 34652013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
3466
3467 PR c++/58080
3468 * c-common.c (pointer_int_sum): Add bool parameter.
3469 * c-common.h (pointer_int_sum): Adjust declaration.
3470
f874ddad 34712013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
3472
3473 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
3474 c_pretty_printer variable.
3475
a94db6b0 34762013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3477
3478 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
3479 (pp_base): Remove.
3480 (pp_c_base): Likewise. Adjust users.
3481 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
3482 (pp_c_whitespace): Do not call pp_base.
3483 (pp_c_left_paren): Likewise.
3484 (pp_c_right_paren): Likewise.
3485 (pp_c_left_brace): Likewise.
3486 (pp_c_right_brace): Likewise.
3487 (pp_c_left_bracket): Likewise.
3488 (pp_c_right_bracket): Likewise.
3489 (pp_c_dot): Likewise.
3490 (pp_c_ampersand): Likewise.
3491 (pp_c_star): Likewise.
3492 (pp_c_arrow): Likewise.
3493 (pp_c_semicolon): Likewise.
3494 (pp_c_complement): Likewise.
3495 (pp_c_exclamation): Likewise.
3496 (pp_c_direct_declarator): Likewise.
3497 (pp_c_ws_string): Likewise.
3498 (pp_c_identifier): Likewise.
3499 (pp_c_statement): Likewise.
3500 (print_c_tree): Likewise.
3501
1898176c 35022013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
3503
3504 PR c++/58072
3505 * c-common.c (c_parse_error): Catch user-defined literal tokens and
3506 provide useful error strings.
3507
70d60d1d 35082013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3509
3510 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
3511 printer functions instead of pp_string or operators and punctuators.
3512 (dump_generic_ada_node): Likewise.
3513 * c-pretty-print.c (pp_c_type_specifier): Likewise.
3514 (pp_c_relational_expression): Likewise.
3515 (pp_c_logical_or_expression): Likewise.
3516
dda4f0ec 35172013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3518
3519 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
3520 functions instead of pp_character.
3521 (pp_ada_tree_identifier): Likewise.
3522 (dump_ada_double_name): Likewise.
3523 (dump_ada_function_declaration): Likewise.
3524 (dump_ada_array_domains): Likewise.
3525 (dump_template_types): Likewise.
3526 (dump_generic_ada_node): Likewise.
3527 (print_ada_declaration): Likewise.
3528 (print_ada_struct_decl): Likewise.
3529 * c-pretty-print.c (pp_c_integer_constant): Likewise.
3530
7aa04c8d 35312013-07-23 Tom Tromey <tromey@redhat.com>
3532
3533 * c-common.h (enum rid) <RID_GENERIC>: New constant.
3534 * c-common.c (c_common_reswords): Add _Generic.
3535
a04e8d62 35362013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
3537
3538 * c-common.c: Fix typos.
3539 * c-common.h: Likewise.
3540
a96c3cc1 35412013-07-13 Lubos Lunak <l.lunak@suse.cz>
3542
3543 PR c++/55203
3544 * c-common.c (c_common_attribute_table): Add warn_unused.
3545 (handle_warn_unused_attribute): New.
3546
da31536d 35472013-07-10 Jakub Jelinek <jakub@redhat.com>
3548
3549 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
3550 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
3551
839f2f70 35522013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
3553
3554 PR c++/57869
3555 * c.opt: Add Wconditionally-supported.
3556
73f353d0 35572013-07-08 Graham Stott <graham.stott@btinternet.com>
3558
1f78217c 3559 * array-notation-common.c (length_mismatch_in_expr_p): Delete
73f353d0 3560 unused variables l_length and l_node.
3561
21ebaa24 35622013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 3563
3564 PR c/57821
3565 * c-common.c (complete_array_type): Delay folding first index
3566 like other indices. When folding, check for index overflow.
3567
68ea4406 35682013-06-27 Marc Glisse <marc.glisse@inria.fr>
3569
3570 PR c++/57509
3571 * c-common.h (c_build_vec_perm_expr): New complain argument.
3572 * c-common.c (c_build_vec_perm_expr): Likewise.
3573 Use save_expr also in C++.
3574
60777f69 35752013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3576
3577 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
3578 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
3579 * c-opts.c (c_common_post_options): Likewise.
3580
839f2f70 35812013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
50acebe0 3582
3583 * array-notation-common.c (length_mismatch_in_expr): Changed the
3584 parameter type's from a dynamic array to a vec_tree. Also removed
3585 the size parameters.
3586 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
3587 the change above.
3588
e9331eab 35892013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3590
3591 * c-common.h (struct cilkplus_an_parts): New structure.
3592 (struct cilkplus_an_loop_parts): Likewise.
3593 (cilkplus_extract_an_triplets): New prototype.
3594 (fix_sec_implicit_args): Likewise.
3595 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
3596 (fix_sec_implicit_args): Likewise.
60777f69 3597
a9c99fc4 35982013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
3599
3600 * array-notation-common.c (find_inv_trees): Removed an unwanted
3601 typecasting.
3602 * c-common.h (struct inv_list::additional_tcodes): Changed type from
3603 enum rid to enum tree_code.
3604
f2526cce 36052013-06-11 Jan Hubicka <jh@suse.cz>
3606
3607 * c-common.c (handle_alias_ifunc_attribute): Do not set
3608 DECL_EXTERNAL for weakref variables.
3609 * c-pragma.c (handle_pragma_weak): Make sure aliases
3610 are not declared as external.
3611
09970d67 36122013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3613
3614 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
3615 function from c/c-array-notation.c.
3616 (is_cilkplus_reduce_builtin): Likewise.
3617 (find_rank): Likewise.
3618 (extract_array_notation_exprs): Likewise.
3619 (replace_array_notations): Likewise.
3620 (find_inv_trees): Likewise.
3621 (replace_inv_trees): Likewise.
3622 (contains_array_notation_expr): Likewise.
3623 (find_correct_array_notation_type): Likewise.
3624 * c-common.h (struct inv_list): Moved this struct from the file
3625 c/c-array-notation.c and added a new field called additional tcodes.
3626 (length_mismatch_in_expr_p): New prototype.
3627 (is_cilkplus_reduce_builtin): Likewise.
3628 (find_rank): Likewise.
3629 (extract_array_notation_exprs): Likewise.
3630 (replace_array_notation): Likewise.
3631 (find_inv_trees): Likewise.
3632 (replace_inv_trees): Likewise.
3633 (find_correct_array_notation_type): Likewise.
839f2f70 3634
3c6d4197 36352013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3636
3637 * c-common.c (c_define_builtins): When cilkplus is enabled, the
3638 function array_notation_init_builtins is called.
3639 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
3640 * c-common.def (ARRAY_NOTATION_REF): New tree.
3641 * c-common.h (build_array_notation_expr): New function declaration.
3642 (build_array_notation_ref): Likewise.
3643 (extract_sec_implicit_index_arg): New extern declaration.
3644 (is_sec_implicit_index_fn): Likewise.
3645 (ARRAY_NOTATION_CHECK): New define.
3646 (ARRAY_NOTATION_ARRAY): Likewise.
3647 (ARRAY_NOTATION_START): Likewise.
3648 (ARRAY_NOTATION_LENGTH): Likewise.
3649 (ARRAY_NOTATION_STRIDE): Likewise.
3650 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
3651 ARRAY_NOTATION_REF.
3652 (pp_c_expression): Likewise.
3653 * c.opt (flag_enable_cilkplus): New flag.
3654 * array-notation-common.c: New file.
3655
8e71dad2 36562013-05-14 Jakub Jelinek <jakub@redhat.com>
3657
3658 PR c++/57274
3659 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
3660
432dd330 36612013-05-10 Marc Glisse <marc.glisse@inria.fr>
3662
3663 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
3664 vectors.
3665
b156ec37 36662013-05-07 Han Shen <shenhan@google.com>
3667
3668 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
3669
1a087624 36702013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3671
3672 * c-common.c (check_user_alignment): Emit error for negative values.
3673
1638c736 36742013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3675
3676 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
3677
949dbf93 36782013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3679
3680 * c-cppbuiltin.c (c_cpp_builtins): Do not define
3681 __GXX_EXPERIMENTAL_CXX1Y__.
3682
9205a6cc 36832013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3684 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3685
3686 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
3687 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
3688 to simply use OPT_Wpointer_arith.
3689 (c_sizeof_or_alignof_type): Likewise.
3690
05d0bce1 36912013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3692
3693 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
3694
41609f8b 36952013-04-12 Jakub Jelinek <jakub@redhat.com>
3696
3697 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
3698 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
3699 specifiers.
3700
c671dc4f 37012013-04-07 Steven Bosscher <steven@gcc.gnu.org>
3702
3703 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
3704
ba125576 37052013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
3706
3707 * c-common.c (pointer_int_sum): Remove dead code.
3708
9d3fa937 37092013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
3710
3711 PR middle-end/56524
3712 * c-common.c (handle_optimize_attribute): Don't call
3713 save_optabs_if_changed.
3714
5ceebb21 37152013-03-05 Jakub Jelinek <jakub@redhat.com>
3716
3717 PR middle-end/56461
3718 * c-pch.c (pch_init): Free target_validity at the end.
3719
18eeed2b 37202013-03-04 Jakub Jelinek <jakub@redhat.com>
3721
3722 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
3723
a9196da9 37242013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
3725 Jakub Jelinek <jakub@redhat.com>
3726
3727 PR sanitizer/56454
3728 * c-common.c (handle_no_sanitize_address_attribute): New function.
3729 (c_common_attribute_table): Add no_sanitize_address attribute.
3730 (handle_no_address_safety_analysis_attribute): Add
3731 no_sanitize_address attribute, not no_address_safety_analysis
3732 attribute.
3733
15c27dda 37342013-02-18 Aldy Hernandez <aldyh@redhat.com>
08c7d04b 3735
3736 PR target/52555
3737 * c-common.c (handle_optimize_attribute): Call
3738 save_optabs_if_changed.
3739
19426fe1 37402013-02-18 Jakub Jelinek <jakub@redhat.com>
3741 Steven Bosscher <steven@gcc.gnu.org>
3742
3743 PR pch/54117
3744 * c-opts.c (c_common_post_options): If debug info is enabled
3745 and non-dwarf*, refuse to load PCH files and when writing PCH
3746 file warn.
3747
df936998 37482013-02-05 Jakub Jelinek <jakub@redhat.com>
3749
3750 PR middle-end/56167
3751 * c-common.c (handle_error_attribute): Fix condition.
3752
ae0c3984 37532013-01-30 Jakub Jelinek <jakub@redhat.com>
3754
3755 PR c++/55742
3756 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
3757
1c4973d7 37582013-01-18 Jason Merrill <jason@redhat.com>
3759
3760 PR target/54908
3761 * c.opt (-fextern-tls-init): New.
3762 * c-opts.c (c_common_post_options): Handle it.
3763
7c834436 37642013-01-09 Jakub Jelinek <jakub@redhat.com>
3765
3766 PR c/48418
3767 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
3768 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
3769 and is either negative or bigger or equal to type precision
3770 of the first operand.
3771
5abaa10a 37722012-12-03 Marek Polacek <polacek@redhat.com>
3773
3774 PR c/55570
3775 * c-common.c (check_user_alignment): Swap order of tests,
3776 check TREE_CODE first.
3777
324ca377 37782012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
3779
3780 PR c++/52654
3781 * c-common.h (overflow_type): New enum.
3782 (build_userdef_literal): Add overflow_type argument.
3783 (tree_userdef_literal): Add overflow_type.
3784 (USERDEF_LITERAL_OVERFLOW): New access macro.
3785 * c-common.c (build_userdef_literal): Add overflow_type
3786 argument.
3787 * c-lex.c (c_lex_with_flags): Add overflow_type to
3788 build_userdef_literal calls.
3789 (interpret_integer, interpret_float): Add overflow_type argument.
3790
b4c4a429 37912012-11-28 Richard Biener <rguenther@suse.de>
3792
3793 PR c/35634
3794 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
3795 here and use a type with proper overflow behavior for types that would
3796 need to be promoted for the arithmetic.
3797
d413ffdd 37982012-11-23 Jakub Jelinek <jakub@redhat.com>
3799
3800 PR sanitizer/55435
3801 * c-common.c (handle_no_address_safety_analysis_attribute): New
3802 function.
3803 (c_common_attribute_table): Add no_address_safety_analysis.
3804
52bc861d 38052012-11-16 Simon Baldwin <simonb@google.com>
3806
3807 * c.opt: Add f[no-]canonical-system-headers.
3808 * c-opts.c (c_common_handle_option): Handle
3809 OPT_fcanonical_system_headers.
3810
2dd00636 38112012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
3812
3813 PR c++/54413
3814 * c-opts.c (c_common_handle_option): Set new flags.
3815 * c.opt: Describe new flags.
3816
d4701f6c 38172012-11-09 Jason Merrill <jason@redhat.com>
3818
3819 * c.opt (Wabi-tag): New.
3820
72d65da9 38212012-11-09 Andi Kleen <ak@linux.intel.com>
3822
3823 PR 55139
3824 * c-common.c (get_atomic_generic_size): Mask with
3825 MEMMODEL_MASK
3826
77a357e3 38272012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
3828
3829 PR c/53063
3830 * c.opt (Wformat): Make it Alias Wformat=1.
3831 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
3832 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
3833 LangEnabledBy.
3834 (Wformat=): RejectNegative. Use LangEnabledBy.
3835 (Wnonnull): Use LangEnabledBy.
3836 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
3837 * c-format.c (set_Wformat): Delete.
3838 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
3839 (maybe_read_dollar_number): Likewise.
3840 (avoid_dollar_number): Likewise.
3841 (finish_dollar_format_checking): Likewise.
3842 (check_format_info): Likewise.
3843 (check_format_info_main): Likewise.
3844 (check_format_types): Likewise.
3845 (format_type_warning): Likewise.
3846 * c-common.c (int): Likewise.
3847 (check_function_sentinel): Likewise.
3848 * c-common.h (warn_format,set_Wformat): Do not declare here.
3849
45efa6b9 38502012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
3851
3852 PR c/53063
3853 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
3854 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
3855 Use LangEnabledBy.
3856 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
3857 common.opt.
3858 (Wvariadic-macros): Init(1).
3859 * c-opts.c (c_common_handle_option): Do not handle them
3860 explicitly.
3861 (c_common_post_options): Likewise.
3862 (sanitize_cpp_opts): warn_unused_macros is now
3863 cpp_warn_unused_macros.
3864 (push_command_line_include): Likewise.
3865 * c-common.c (warn_unknown_pragmas): Do not define.
3866 * c-common.h (warn_unknown_pragmas): Do not declare.
3867
0e4e775a 38682012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
3869
3870 PR c/51294
3871 * c-common.c (conversion_warning): Handle conditional expressions.
3872
8b447d3f 38732012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3874
3875 PR c++/54930
3876 * c.opt (Wreturn_local_addr): Define new option.
3877
f4a61754 38782012-10-25 Jason Merrill <jason@redhat.com>
3879
ecb10e6a 3880 * c.opt (Wvirtual-move-assign): New.
3881
f4a61754 3882 * c.opt (Winherited-variadic-ctor): New.
3883
7b463b19 38842012-10-25 Marc Glisse <marc.glisse@inria.fr>
3885
3886 PR c++/54427
3887 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
3888
6adc88f8 38892012-10-23 Joseph Myers <joseph@codesourcery.com>
3890
3891 * c-common.h (pch_cpp_save_state): Declare.
3892 * c-target.def (c_preinclude): New hook.
3893 * c-opts.c (done_preinclude): New.
3894 (push_command_line_include): Handle default preincluded header.
3895 (cb_file_change): Call pch_cpp_save_state when calling
3896 push_command_line_include.
3897 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
3898 (pch_cpp_save_state): New.
3899 (pch_init): Call pch_cpp_save_state conditionally, instead of
3900 calling cpp_save_state.
3901
fa816b0b 39022012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
3903
3904 PR c/53063
3905 PR c/40989
3906 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
3907 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
3908 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
3909 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
3910 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
3911 * c-opts.c (c_common_handle_option): Remove explicit handling from
3912 here.
3913 (c_common_post_options): Likewise.
3914
d214ccee 39152012-10-18 Eric Botcazou <ebotcazou@adacore.com>
3916
3917 * c-ada-spec.c (LOCATION_COL): Delete.
3918 (compare_location): New function.
3919 (compare_node): Use it.
3920 (compare_comment): Likewise.
3921
77b27208 39222012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3923
3924 PR c/53063
3925 PR c/40989
3926 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
3927 * c-opts.c (c_common_handle_option): Do not set them here. Add
3928 comment.
3929 (c_common_post_options): Likewise.
3930
cc02ca4d 39312012-10-16 Eric Botcazou <ebotcazou@adacore.com>
3932
3933 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
3934 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
3935 Remove POINTER_TYPE handling, add large unsigned handling and use
3936 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
3937
57f872a2 39382012-10-12 Jakub Jelinek <jakub@redhat.com>
3939
3940 PR c/54381
3941 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
3942 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
3943 locs and array of 3 trees instead of just single loc and single
3944 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
3945 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
3946 For *cmp* builtins that take two sources strings report warnings
3947 about first and second source, not about destination and source.
3948
7354ad2e 39492012-10-12 Marc Glisse <marc.glisse@inria.fr>
3950
3951 PR c++/53055
3952 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
3953
1ac7f120 39542012-10-11 Eric Botcazou <ebotcazou@adacore.com>
3955
3956 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
3957 declaring something coming from another file.
3958
1e0cc9e3 39592012-10-10 Arnaud Charlet <charlet@adacore.com>
3960
1ac7f120 3961 PR ada/54845
1e0cc9e3 3962 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
3963
b0e7825e 39642012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3965
3966 PR c++/54194
3967 * c-common.c (warn_about_parentheses): Add location_t parameter;
3968 use EXPR_LOC_OR_LOC.
3969 * c-common.h: Update declaration.
3970
41ed701a 39712012-10-09 Marc Glisse <marc.glisse@inria.fr>
3972
3973 PR c++/54427
3974 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
3975 more operations. Make error messages optional.
3976 * c-common.h (enum stv_conv): Moved from c-typeck.c.
3977 (scalar_to_vector): Declare.
3978
3740094c 39792012-10-08 Jason Merrill <jason@redhat.com>
3980
3981 * c-common.c (c_common_reswords): Add thread_local.
3982
ffcdbf9c 39832012-10-08 Dodji Seketeli <dodji@redhat.com>
3984
3985 PR c++/53528 C++11 attribute support
3986 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
3987 new functions.
3988 * c-common.c (check_cxx_fundamental_alignment_constraints): New
3989 static function.
3990 (handle_aligned_attribute): In choose strictest alignment
3991 among many. Use new check_cxx_fundamental_alignment_constraints.
3992 (handle_transparent_union_attribute): In c++11 attribute syntax,
3993 don't look through typedefs.
3994
ef34afc1 39952012-10-04 Arnaud Charlet <charlet@adacore.com>
3996
3997 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
3998 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
3999 out of dumpfile.h.
4000
f1ff4562 40012012-09-25 Dehao Chen <dehao@google.com>
4002
4003 PR middle-end/54645
ef34afc1 4004 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
f1ff4562 4005 map when read in the pch.
4006
735538a1 40072012-09-18 Arnaud Charlet <charlet@adacore.com>
4008
4009 * c-ada-spec.c: Style fixes.
4010
9120cdc8 40112012-09-18 Thomas Quinot <quinot@adacore.com>
4012
4013 * c.opt (-fada-spec-parent): Define new command line switch.
4014 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
4015 is specified, generate binding spec as a child of the specified unit.
4016
8eba82c2 40172012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
4018 Manuel López-Ibáñez <manu@gcc.gnu.org>
4019
4020 PR c++/53210
4021 * c.opt ([Winit-self]): Enabled by -Wall in C++.
4022
38682990 40232012-08-23 Arnaud Charlet <charlet@adacore.com>
4024
4025 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
4026 for pointers, and add missing Convention C pragma.
4027 (print_ada_struct_decl): Add missing aliased keyword.
4028 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
4029
f003f5dc 40302012-08-17 Jakub Jelinek <jakub@redhat.com>
4031
4032 * c-common.c (sizeof_pointer_memaccess_warning): New function.
4033 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
4034 * c-opts.c (c_common_handle_option): Enable it for -Wall.
4035 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
4036 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
4037
ec11736b 40382012-08-10 Richard Guenther <rguenther@suse.de>
4039
4040 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
4041
5f7f600e 40422012-08-07 Steven Bosscher <steven@gcc.gnu.org>
4043
4044 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
4045 instead of separate pp_newline and pp_flush.
4046 (print_c_tree): Likewise.
4047
758a38ab 40482012-07-26 Richard Henderson <rth@redhat.com>
4049
4050 * c-common.c (handle_hot_attribute): Allow labels.
4051 (handle_cold_attribute): Likewise.
4052
9ca77b08 40532012-07-20 Jakub Jelinek <jakub@redhat.com>
4054
4055 PR c++/28656
4056 * c-common.c (check_function_nonnull): Handle multiple nonnull
4057 attributes properly.
4058
b9ed1410 40592012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4060
4061 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
4062 * c-ada-spec.c: Likewise.
4063 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
4064
c2a65b90 40652012-07-14 Steven Bosscher <steven@gcc.gnu.org>
4066
4067 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
4068 Remove code conditional on it.
4069
88c5a1d1 40702012-07-11 Steven Bosscher <steven@gcc.gnu.org>
4071
4072 * c-gimplify.c: Do not include basic-block.h.
4073 * c-common.c: Do not include linfuncs.h.
4074
4a020a8c 40752012-07-08 Steven Bosscher <steven@gcc.gnu.org>
4076
4077 * c-common.h: Include tree.h.
4078
c28ddc97 40792012-07-02 Jason Merrill <jason@redhat.com>
4080
4081 PR c++/53524
4082 * c-common.c (get_priority): Call default_conversion.
4083
405ed67f 40842012-07-01 Uros Bizjak <ubizjak@gmail.com>
4085
4086 * c-pch.c (c_common_write_pch): Remove unused variables.
4087
e53d55e7 40882012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4089
4090 * cppspec.c: Moved from gcc/ to here.
4091
3d9c25ec 40922012-06-27 Kai Tietz <ktietz@redhat.com>
4093
4094 PR preprocessor/37215
4095 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
4096
3169c57a 40972012-06-21 Steven Bosscher <steven@gcc.gnu.org>
4098
4099 * c-common.h (c_common_print_pch_checksum): Remove.
4100 * c-pch.c: Do not include output.h.
4101 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
4102 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
4103 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
4104 (struct c_pch_header): Remove.
4105 (get_ident): Update gpch version.
4106 (pch_init): Do not print executable_checksum to asm_out_file.
4107 Do not fail if there is no asm_out_file to read back from. Set
4108 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
4109 (c_common_write_pch): Verify that nothing was written to asm_out_file
4110 since pch_init was called. Do not write a c_pch_header, and do not
4111 copy from asm_out_file to the PCH.
4112 (c_common_read_pch): Do not read a c_pch_header, and do not restore
4113 the content of asm_out_file from the PCH.
4114 (c_common_print_pch_checksum): Remove.
4115 * c-opts.c (c_common_init): Print out executable_checksum directly.
4116
ff6624bc 41172012-06-19 Steven Bosscher <steven@gcc.gnu.org>
4118
4119 * c-target.def (objc_declare_unresolved_class_reference,
4120 objc_declare_class_definition): Add new hooks.
4121
367b1459 41222012-06-19 Steven Bosscher <steven@gcc.gnu.org>
4123
4124 * c-lex.c: Do not include output.h.
4125 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
4126 Remove uses of ASM_OUTPUT_IDENT.
4127
bf0cb017 41282012-06-15 Marc Glisse <marc.glisse@inria.fr>
4129
4130 PR c++/51033
4131 * c-common.h (c_build_vec_perm_expr): Move decl here.
4132 * c-common.c (c_build_vec_perm_expr): Move definition
4133 here.
4134
b37a3600 41352012-06-06 Steven Bosscher <steven@gcc.gnu.org>
4136
4137 * c.opt (fconserve-space): Turn into a no-op.
4138
19931eea 41392012-06-04 Sterling Augustine <saugustine@google.com>
5f9e7dd5 4140
4141 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
4142 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
4143 both the start and end of the function.
4144
dff12c10 41452012-06-04 Steven Bosscher <steven@gcc.gnu.org>
4146
4147 * c-common.c: Do not include output.h.
4148 * c-pragma.c: Likewise.
4149
5f9e7dd5 41502012-06-04 Steven Bosscher <steven@gcc.gnu.org>
4151
4152 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
4153 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
4154 (lang_decl_name): Handle namespace decls.
4155
b5369b7d 41562012-05-31 Steven Bosscher <steven@gcc.gnu.org>
4157
4158 * c-ada-spec.c: Do not include output.h.
4159 * c-semantics.c: Likewise.
4160
8032877c 41612012-05-29 Joseph Myers <joseph@codesourcery.com>
4162
4163 * c-common.c: Fix typo.
4164
7843e4bc 41652012-05-29 Michael Matz <matz@suse.de>
4166
4167 * c-common.h (c_expand_decl): Remove prototype.
4168
8cf857d4 41692012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4170
4171 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
4172 * c-opts.c (c_common_handle_option): Remove code handling
4173 warn_missing_braces.
4174
8b64dc3c 41752012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
4176
4177 PR c++/25137
4178 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
4179 -Wmissing_braces.
4180
43cbde16 41812012-05-22 Dodji Seketeli <dodji@redhat.com>
4182
4183 PR c++/53322
4184 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
4185
db490cb6 41862012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
4187
4188 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
4189 * c-opts.c (c_common_handle_option): Do not handle explicitly
4190 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
4191
a60f3e81 41922012-05-16 Dodji Seketeli <dodji@redhat.com>
4193
4194 PR preprocessor/7263
4195 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
4196 to cpp_classify_number. For diagnostics, use the precise location
4197 instead of the global input_location.
4198
82e6ef7c 41992012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
4200
cd4797ff 4201 PR c++/11856
82e6ef7c 4202 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
4203
258a168d 42042012-05-14 Bernd Schmidt <bernds@codesourcery.com>
4205
82e6ef7c 4206 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
258a168d 4207
d3b7ee7c 42082012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
4209
4210 PR 53063
4211 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
4212 Wreorder): Use LangEnabledBy.
4213 * c-opts.c (c_common_handle_option): Do not enable them
4214 explicitly. Call lang-specific generated functions.
4215 (c_common_post_options): Do not set them here.
4216
70059cea 42172012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
4218
4219 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
4220 Wmissing-field-initializers,Wmissing-parameter-type,
4221 Wold-style-declaration,Woverride-init): Use EnabledBy.
4222 * c-opts.c (c_common_post_options): Do not set here explicitly.
4223
fbb6fbd8 42242012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
4225
4226 PR 53063
4227 * c-opts.c (c_common_handle_option): Use handle_generated_option
4228 to enable sub-options.
4229
61f69bc9 42302012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
4231
4232 PR c++/53158
4233 * c-common.c (warnings_for_convert_and_check): Use warning_at.
4234
5a1fe2db 42352012-05-10 Richard Guenther <rguenther@suse.de>
4236
4237 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
4238 adjust commentary about TYPE_IS_SIZETYPE types.
4239
d42e7c5a 42402012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4241
4242 PR c++/53261
4243 * c-common.c (warn_logical_operator): Check that argument of
4244 integer_zerop is not NULL.
4245
686369e8 42462012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
4247
4248 PR c/43772
4249 * c-common.c (warn_logical_operator): Do not warn if either side
4250 is already true or false.
4251
03fe1dc2 42522012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
4253
4254 PR c/51712
4255 * c-common.c (expr_original_type): New.
4256 (shorten_compare): Do not warn for enumeration types.
4257
bba5a206 42582012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
4259
4260 * c.opt (fpermissive): Add Var(flag_permissive).
4261
7059d45d 42622012-04-30 Marc Glisse <marc.glisse@inria.fr>
4263
4264 PR c++/51033
4265 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
4266 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
4267
7edb1062 42682012-04-30 Dodji Seketeli <dodji@redhat.com>
4269
4270 Add -Wvarargs option
4271 * c.opt (Wvarargs): Define new option.
4272
068bea1e 42732012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
4274
4275 * c-common.c (check_function_arguments): Replace
4276 Wmissing-format-attribute with Wsuggest-attribute=format.
4277
b86527d8 42782012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
4279
4280 * c.opt (Wsuggest-attribute=format): New. Alias of
4281 Wmissing-format-attribute.
4282 * c-format.c (decode_format_type): Replace
4283 Wmissing-format-attribute with Wsuggest-attribute=format.
4284 (check_function_format): Likewise.
4285
19931eea 42862012-04-27 Ollie Wild <aaw@google.com>
76d340ac 4287
4288 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
4289 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
4290 * c.opt: Add Wliteral-suffix.
4291
29438999 42922012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
4293
4294 PR c/44774
4295 * c.opt (Wpedantic): New.
4296 (pedantic): Alias Wpedantic.
4297 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
4298 (c_common_post_options): Likewise.
4299 (sanitize_cpp_opts): Likewise.
4300 * c-lex.c (interpret_float): Likewise.
4301 * c-format.c (check_format_types): Likewise.
4302 * c-common.c (pointer_int_sum): Likewise.
4303 (c_sizeof_or_alignof_type): Likewise.
4304 (c_add_case_label): Likewise.
4305 (c_do_switch_warnings): Likewise.
4306 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
4307
4f9d6b8b 43082012-04-15 Jason Merrill <jason@redhat.com>
4309
4310 PR c++/52818
4311 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
4312 (C_STD_NAME): Distinguish between C++98 and C++11.
4313
74bdbe96 43142012-04-11 Eric Botcazou <ebotcazou@adacore.com>
4315
4316 PR target/52624
4317 * c-common.h (uint16_type_node): Rename into...
4318 (c_uint16_type_node): ...this.
4319 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
4320 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
4321
3d177e8c 43222012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
4323
4324 * c-common.c (warn_if_unused_value): Move definition to here.
4325 * c-common.h (warn_if_unused_value): Move declaration to here.
4326
6a9a958f 43272012-03-23 William Bader <williambader@hotmail.com>
4328
4329 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
4330
543efdbe 43312012-03-20 Jason Merrill <jason@redhat.com>
4332
4333 * c-common.h (enum cxx_dialect): Add cxx1y.
4334 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
4335 test.
4336 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
4337 * c-opts.c (c_common_post_options): Likewise.
4338 (set_std_cxx1y): New.
4339 (c_common_handle_option): Call it.
4340 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
4341
62206d34 43422012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
4343
4344 PR c++/14710
4345 * c.opt ([Wuseless-cast]): Add.
4346
fadf62f4 43472012-03-16 Richard Guenther <rguenther@suse.de>
4348
4349 * c-pretty-print.c (pp_c_initializer_list): Adjust.
4350
249faa35 43512012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
4352
4353 PR c++/44783
4354 * c.opt (ftemplate-backtrace-limit) Add.
4355
126b6848 43562012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4357
4358 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
4359 handling.
4360 * c-pragma.c (handle_pragma_extern_prefix): Remove.
4361 (init_pragma): Don't register extern_prefix.
4362
a51edb4c 43632012-03-12 Richard Guenther <rguenther@suse.de>
4364
4365 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
4366 (builtin_type_for_size): Likewise.
4367
0f6a7cb7 43682012-02-13 Jakub Jelinek <jakub@redhat.com>
4369
4370 PR c++/52215
4371 * c-common.c (sync_resolve_params): Don't decide whether to convert
4372 or not based on TYPE_SIZE comparison, convert whenever arg_type
4373 is unsigned INTEGER_TYPE.
4374
0779e32c 43752012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
4376
4377 PR c/52118
4378 * c.opt ([Wunused-local-typedefs]): Fix description.
4379
baec58e1 43802012-01-24 Mike Stump <mikestump@comcast.net>
4381
4382 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
4383 exactly.
4384
c779d8cc 43852012-01-18 Richard Guenther <rguenther@suse.de>
4386
4387 * c-opts.c (c_common_post_options): Reset LTO flags if
4388 we are about to generate a PCH.
4389
ee917d24 43902012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
4391
4392 PR c++/51777
4393 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
4394 use pp_unsigned_wide_integer.
4395
90e2341f 43962012-01-10 Richard Guenther <rguenther@suse.de>
4397
4398 PR middle-end/51806
4399 * c-opts.c (c_common_handle_option): Move -Werror handling
4400 to language independent code.
4401
9ea022ce 44022012-01-05 Richard Guenther <rguenther@suse.de>
4403
4404 PR middle-end/51764
4405 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
4406 from common.opt.
4407
3df19e1b 44082011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
4409
4410 PR c++/51316
4411 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
4412 of array types with an unknown bound.
4413
32074525 44142011-12-20 Joseph Myers <joseph@codesourcery.com>
4415
4416 * c-common.c (flag_isoc99): Update comment to refer to C11.
4417 (flag_isoc1x): Change to flag_isoc11.
4418 * c-common.h (flag_isoc99): Update comment to refer to C11.
4419 (flag_isoc1x): Change to flag_isoc11.
4420 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
4421 C11.
4422 * c-opts.c (set_std_c1x): Change to set_std_c11.
4423 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
4424 Call set_std_c11.
4425 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
4426 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
4427 * c.opt (std=c1x): Change to std=c11. Document as non-draft
4428 standard.
4429 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
4430 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
4431 (std=gnu1x): Make alias of std=gnu11.
4432
fca86134 44332011-12-19 Jason Merrill <jason@redhat.com>
4434
4435 PR c++/51228
4436 * c-common.c (handle_transparent_union_attribute): Check the first
4437 field if the type is complete.
4438
aa4313eb 44392011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
4440
4441 PR libstdc++/51365
4442 * c-common.c (RID_IS_FINAL): Add.
4443 * c-common.h (RID_IS_FINAL): Add.
4444
3f3d5ad4 44452011-11-30 Iain Sandoe <iains@gcc.gnu.org>
4446
4447 * c.opt (fgnu-runtime): Provide full description.
4448 (fnext-runtime): Likewise.
4449 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
4450
c4606d19 44512011-11-28 Andrew MacLeod <amacleod@redhat.com>
4452
4453 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
4454 predefines in one place. Add LOCK_FREE predefines.
4455 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
4456 new func.
4457
1d581089 44582011-11-24 Andrew MacLeod <amacleod@redhat.com>
4459
4460 PR c/51256
19931eea 4461 * c-common.c (get_atomic_generic_size): Check for various error
1d581089 4462 conditions
19931eea 4463 (resolve_overloaded_atomic_exchange,
4464 resolve_overloaded_atomic_compare_exchange,
1d581089 4465 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
4466 error_mark_node for error conditions.
19931eea 4467
6aa221fa 44682011-11-08 Richard Guenther <rguenther@suse.de>
4469
4470 PR middle-end/51010
4471 c-family/
4472
4c0315d0 44732011-11-07 Richard Henderson <rth@redhat.com>
4474 Aldy Hernandez <aldyh@redhat.com>
4475 Torvald Riegel <triegel@redhat.com>
4476
4477 Merged from transactional-memory.
4478
4479 * c-common.c (handle_tm_wrap_attribute,
4480 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
4481 (struct c_common_reswords): Added __transaction* keywords.
4482 (struct c_common_attribute_table): Added transaction* and tm_regparm
4483 attributes.
4484 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
4485 masks.
4486 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
4487 find_tm_attribute): Declare.
4488
920f5a70 44892011-11-07 Jason Merrill <jason@redhat.com>
4490
4491 PR c++/35688
4492 * c-common.c, c-common.h: Revert yesterday's changes.
4493
b4f861b4 44942011-11-06 Jason Merrill <jason@redhat.com>
4495
4496 PR c++/35688
4497 * c-common.c (decl_has_visibility_attr): Split out from...
4498 (c_determine_visibility): ...here.
4499 * c-common.h: Declare it.
4500
83e25171 45012011-11-06 Joseph Myers <joseph@codesourcery.com>
4502
4503 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
4504 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
4505 type.
4506 (check_user_alignment): New. Split out of
4507 handle_aligned_attribute. Disallow integer constants with
4508 noninteger types. Conditionally allow zero.
4509 (handle_aligned_attribute): Use check_user_alignment.
4510 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
4511
1cd6e20d 45122011-11-06 Andrew MacLeod <amacleod@redhat.com>
4513 Richard Henderson <rth@redhat.com>
4514
4515 Merged from cxx-mem-model.
4516
4517 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
19931eea 4518 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
1cd6e20d 4519 parameters that are the same type size.
4520 (get_atomic_generic_size): New. Find size of generic
4521 atomic function parameters and do typechecking.
4522 (add_atomic_size_parameter): New. Insert size into parameter list.
4523 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
4524 either __atomic_exchange_n or external library call.
19931eea 4525 (resolve_overloaded_atomic_compare_exchange): Restructure
1cd6e20d 4526 __atomic_compare_exchange to either _n variant or external library call.
19931eea 4527 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
1cd6e20d 4528 __atomic_load_n or an external library call.
4529 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
4530 __atomic_store_n or an external library call.
4531 (resolve_overloaded_builtin): Handle new __atomic builtins.
4532
7549df0d 45332011-11-04 Eric Botcazou <ebotcazou@adacore.com>
4534
4535 PR c++/50608
4536 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
4537 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
4538 <INDIRECT_REF>: Return the argument.
4539 <ARRAY_REF>: Remove special code for negative offset.
4540 Call fold_build_pointer_plus instead of size_binop.
4541 (fold_offsetof): Remove STOP_REF argument and adjust.
4542 * c-common.h (fold_offsetof_1): Declare.
4543 (fold_offsetof): Remove STOP_REF argument.
4544
7e783eb3 45452011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
4546
4547 PR c++/50810
4548 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
4549 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
4550 Wnarrowing for C++0x and C++98.
4551 * c.opt ([Wnarrowing]): Update.
4552
8fe701f5 45532011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
4554
4555 PR c++/44277
4556 * c.opt: Add Wzero-as-null-pointer-constant.
4557
0d84dc2d 45582011-10-31 Jason Merrill <jason@redhat.com>
4559
67031f52 4560 * c.opt (-fdeduce-init-list): Off by default.
4561
0d84dc2d 4562 PR c++/50920
4563 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
4564 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
4565 and -Wc++11-compat.
4566 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
4567
66f24c41 45682011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
4569
4570 PR c++/30066
4571 * c.opt (fvisibility-inlines-hidden): Description change.
4572
244db24d 45732011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
4574
4575 Implement C++11 user-defined literals.
4576 * c-common.c (build_userdef_literal): New.
4577 * c-common.def: New tree code.
4578 * c-common.h (tree_userdef_literal): New tree struct and accessors.
4579 * c-lex.c (interpret_float): Add suffix parm.
4580 (c_lex_with_flags): Build literal tokens.
4581
235be70f 45822011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
4583
4584 PR c++/50841
4585 Revert:
4586 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
4587
4588 PR c++/50810
4589 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
4590 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
4591 Wnarrowing for C++0x and C++98.
4592 * c.opt ([Wnarrowing]): Update.
4593
4fe0fb1c 45942011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
4595
4596 PR c++/50810
4597 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
4598 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
4599 Wnarrowing for C++0x and C++98.
4600 * c.opt ([Wnarrowing]): Update.
4601
5f7504f9 46022011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
4603
4604 PR c++/45385
4605 * c-common.c (conversion_warning): Remove code looking for
4606 artificial operands.
4607
2a688977 46082011-10-18 Dodji Seketeli <dodji@redhat.com>
4609
4610 PR bootstrap/50760
4611 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
19931eea 4612 !NO_IMPLICIT_EXTERN_C.
2a688977 4613
326e3391 46142011-10-17 Michael Spertus <mike_spertus@symantec.com>
4615
4616 * c-common.c (c_common_reswords): Add __bases,
4617 __direct_bases.
4618 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
4619
46202011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
4621
4622 PR c++/50757
4623 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
4624
62db153a 46252011-10-15 Tom Tromey <tromey@redhat.com>
4626 Dodji Seketeli <dodji@redhat.com>
4627
4628 * c.opt (fdebug-cpp): New option.
4629 * c-opts.c (c_common_handle_option): Handle the option.
4630 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
4631 output stream in parameter. Factorized from ...
4632 (maybe_print_line): ... this. Dump location debug information when
4633 -fdebug-cpp is in effect.
4634 (print_line_1): New static function. Takes an output stream in
4635 parameter. Factorized from ...
4636 (print_line): ... here. Dump location information when -fdebug-cpp
4637 is in effect.
4638 (scan_translation_unit): Dump location information when
4639 -fdebug-cpp is in effect.
4640
ce70f433 46412011-10-15 Tom Tromey <tromey@redhat.com>
4642 Dodji Seketeli <dodji@redhat.com>
4643
4644 * c.opt (ftrack-macro-expansion): New option. Handle it with and
4645 without argument.
4646 * c-opts.c (c_common_handle_option)<case
4647 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
4648 cases. Handle -ftrack-macro-expansion with and without argument.
4649
97bfb9ef 46502011-10-15 Tom Tromey <tromey@redhat.com>
4651 Dodji Seketeli <dodji@redhat.com>
4652
4653 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
4654 (print_line, cb_define, do_line_change): Adjust to avoid touching
4655 the internals of struct line_map. Use the public API instead.
4656 * c-pch.c (c_common_read_pch): Likewise.
4657 * c-lex.c (fe_file_change): Likewise.
4658
326e3391 46592011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
4660
4661 PR c++/17212
4662 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
4663
46642011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
4665
4666 PR c++/33067
4667 * c-pretty-print.c (pp_c_floating_constant): Output
4668 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
4669
b9a16870 46702011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
4671
4672 * c-common.c (def_builtin_1): Delete old interface with two
4673 parallel arrays to hold standard builtin declarations, and replace
4674 it with a function based interface that can support creating
4675 builtins on the fly in the future. Change all uses, and poison
4676 the old names. Make sure 0 is not a legitimate builtin index.
4677 * c-omp.c (c_finish_omp_barrier): Ditto.
4678 (c_finish_omp_taskwait): Ditto.
4679 (c_finish_omp_flush): Ditto.
4680
c7964868 46812011-10-11 Tristan Gingold <gingold@adacore.com>
4682
4683 * c.opt: (fallow-parameterless-variadic-functions): New.
4684
a4e3ffad 46852011-09-08 Dodji Seketeli <dodji@redhat.com>
4686
4687 PR c++/33255 - Support -Wunused-local-typedefs warning
4688 * c-common.h (struct c_language_function::local_typedefs): New
4689 field.
19931eea 4690 (record_locally_defined_typedef, maybe_record_typedef_use)
4691 (maybe_warn_unused_local_typedefs): Declare new functions.
a4e3ffad 4692 * c-common.c (record_locally_defined_typedef)
19931eea 4693 (maybe_record_typedef_use)
4694 (maybe_warn_unused_local_typedefs): Define new functions.
a4e3ffad 4695 * c.opt: Declare new -Wunused-local-typedefs flag.
4696
737a23cc 46972011-09-06 Eric Botcazou <ebotcazou@adacore.com>
4698
4699 PR middle-end/50266
4700 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
4701 computations.
4702
7542c3b4 47032011-09-05 Richard Guenther <rguenther@suse.de>
4704
4705 * c-common.c (complete_array_type): Use ssize_int (-1) instead
4706 of integer_minus_one_node for empty array upper bounds.
4707
1dc92c59 47082011-08-28 Dodji Seketeli <dodji@redhat.com>
4709
4710 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
4711 it's the first time it's being called on this main TU.
4712
2bdf2b6e 47132011-08-24 Richard Guenther <rguenther@suse.de>
4714
4715 PR c/49396
4716 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
4717
47182011-08-22 Gabriel Charette <gchare@google.com>
6ea2c7a3 4719
4720 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
4721 defined in cpp_init_builtins and c_cpp_builtins.
4722
bff4ad11 47232011-08-19 Joseph Myers <joseph@codesourcery.com>
4724
4725 * c-common.c (c_common_reswords): Add __builtin_complex.
4726 * c-common.h (RID_BUILTIN_COMPLEX): New.
4727
985c6e3a 47282011-08-18 Joseph Myers <joseph@codesourcery.com>
4729
4730 * c-common.c (c_common_reswords): Add _Noreturn.
4731 (keyword_is_function_specifier): Handle RID_NORETURN.
4732 * c-common.h (RID_NORETURN): New.
4733
7dfa155b 47342011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
4735
4736 * c-common.c (unsafe_conversion_p): New function. Check if it is
4737 unsafe to convert an expression to the type.
4738 (conversion_warning): Adjust, use unsafe_conversion_p.
4739 * c-common.h (unsafe_conversion_p): New function declaration.
4740
2169f33b 47412011-08-02 Jakub Jelinek <jakub@redhat.com>
4742
4743 * c-common.h (c_finish_omp_atomic): Adjust prototype.
4744 (c_finish_omp_taskyield): New prototype.
4745 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
4746 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
4747 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
4748 or RHS1 have side-effects, evaluate those too in the right spot,
4749 if it is a decl and LHS is also a decl, error out if they
4750 aren't the same.
4751 (c_finish_omp_taskyield): New function.
4752 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
4753 * c-pragma.c (omp_pragmas): Add taskyield.
4754 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
4755 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
4756 PRAGMA_OMP_CLAUSE_MERGEABLE.
4757
ab77850e 47582011-07-25 Dodji Seketeli <dodji@redhat.com>
4759
4760 * c-common.h (set_underlying_type): Remove parm name from
4761 declaration.
4762
6ee97920 47632011-07-25 Romain Geissler <romain.geissler@gmail.com>
4764
4765 * c-pretty-print.h: Search c-common.h in c-family.
19931eea 4766
dc251364 47672011-07-22 Jason Merrill <jason@redhat.com>
4768
1a2a35f0 4769 PR c++/49793
4770 * c.opt (Wnarrowing): New.
4771
27282252 4772 PR c++/30112
4773 * c-common.h: Declare c_linkage_bindings.
4774 * c-pragma.c (handle_pragma_redefine_extname): Use it.
4775
dc251364 4776 PR c++/49813
4777 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
4778 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
4779 as flag_isoc99 for 'restrict'.
4780 (pp_c_specifier_qualifier_list): Likewise for _Complex.
4781
fc501191 47822011-07-21 Ian Lance Taylor <iant@google.com>
4783
4784 PR middle-end/49705
4785 * c-common.c (c_disable_warnings): New static function.
4786 (c_enable_warnings): New static function.
4787 (c_fully_fold_internal): Change local unused_p to bool. Call
4788 c_disable_warnings and c_enable_warnings rather than change
4789 c_inhibit_evaluation_warnings.
4790
07b8f133 47912011-07-20 Jason Merrill <jason@redhat.com>
4792
4793 PR c++/6709 (DR 743)
4794 PR c++/42603 (DR 950)
4795 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
4796 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
4797 (CPP_DECLTYPE): New.
4798 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
4799
2cc66f2a 48002011-07-19 Richard Guenther <rguenther@suse.de>
4801
4802 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
4803 * c-omp.c (c_finish_omp_for): Likewise.
4804
3c802a1e 48052011-07-12 Eric Botcazou <ebotcazou@adacore.com>
4806
4807 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
4808 body on the next line.
4809
98a33d9f 48102011-07-08 Jason Merrill <jason@redhat.com>
4811
3115bda0 4812 PR c++/45437
4813 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
4814
98a33d9f 4815 PR c++/49673
4816 * c-common.c (c_apply_type_quals_to_decl): Don't check
4817 TYPE_NEEDS_CONSTRUCTING.
4818
c38a75b7 48192011-07-06 Richard Guenther <rguenther@suse.de>
4820
4821 * c-common.c (c_common_nodes_and_builtins):
4822 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
4823
e593356b 48242011-07-05 Richard Guenther <rguenther@suse.de>
4825
4826 * c-common.c (c_common_nodes_and_builtins): Build all common
4827 tree nodes first.
4828
fca0886c 48292011-06-27 Jakub Jelinek <jakub@redhat.com>
4830
a68f7a8d 4831 * c-common.h (c_tree_chain_next): New static inline function.
4832
fca0886c 4833 * c-common.c (check_builtin_function_arguments): Handle
4834 BUILT_IN_ASSUME_ALIGNED.
4835
2797f13a 48362011-06-21 Andrew MacLeod <amacleod@redhat.com>
4837
4838 * c-common.c: Add sync_ or SYNC__ to builtin names.
4839 * c-omp.c: Add sync_ or SYNC__ to builtin names.
9cad95b7 4840
48412011-06-20 Pierre Vittet <piervit@pvittet.com>
4842
4843 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
4844 handler.
4845 (gen_pragma_handler): New union.
4846 (internal_pragma_handler): New type.
4847 (c_register_pragma_with_data)
4848 (c_register_pragma_with_expansion_and_data): New functions.
4849
4850 * c-pragma.c (registered_pragmas, c_register_pragma_1)
4851 (c_register_pragma, c_register_pragma_with_expansion)
4852 (c_invoke_pragma_handler): Changed to work with
4853 internal_pragma_handler.
4854 (c_register_pragma_with_data)
4855 (c_register_pragma_with_expansion_and_data): New functions.
4856
218e3e4e 48572011-06-14 Joseph Myers <joseph@codesourcery.com>
4858
4859 * c-common.c: Include common/common-target.h.
4860 (handle_section_attribute): Use
4861 targetm_common.have_named_sections.
4862 * c-cppbuiltin.c: Include common/common-target.h.
4863 (c_cpp_builtins): Use targetm_common.except_unwind_info.
4864
41e53ed2 48652011-06-10 Richard Guenther <rguenther@suse.de>
4866
4867 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
4868 to print a IDENTIFIER_NODE.
4869
a6f06169 48702011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4871 Joseph Myers <joseph@codesourcery.com>
4872
4873 * c.opt (fbuilding-libgcc): New option.
4874 * c-cppbuiltin.c (c_cpp_builtins): Define
4875 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
4876
1ea9269b 48772011-06-07 Jason Merrill <jason@redhat.com>
4878
8ce59854 4879 * c-common.c (max_tinst_depth): Lower default to 900.
4880
1ea9269b 4881 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
4882
1af0124d 48832011-06-07 Richard Guenther <rguenther@suse.de>
4884
4885 * c-common.c (c_common_nodes_and_builtins): Do not set
4886 size_type_node or call set_sizetype.
4887
0e9a4c01 48882011-06-07 Dodji Seketeli <dodji@redhat.com>
4889
4890 PR debug/49130
4891 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
19931eea 4892 type when using pointer comparison to compare types.
0e9a4c01 4893
90b40725 48942011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
4895
4896 * c.opt: Add -Wdelete-non-virtual-dtor.
4897 * c-opts.c (c_common_handle_option): Include it in -Wall.
4898
fc9c9e87 48992011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
4900
4901 PR bootstrap/49190
4902
4903 Revert:
4904 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
4905
4906 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
4907 not tree_common.
4908
d0389adc 49092011-05-27 Jakub Jelinek <jakub@redhat.com>
4910
4911 PR c++/49165
4912 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
4913 C++ don't call c_common_truthvalue_conversion on void type arms.
4914
cacfdc02 49152011-05-27 Nathan Froyd <froydnj@codesourcery.com>
4916
4917 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
4918 (stmt_list_stack): Define.
4919 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
4920 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
4921
027fc6ef 49222011-05-26 Nathan Froyd <froydnj@codesourcery.com>
4923
4924 * c-common.c (warning_candidate_p): Check for BLOCKs.
4925
f21317a1 49262011-05-26 Nathan Froyd <froydnj@codesourcery.com>
4927
4928 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
4929 not tree_common.
4930
789e953d 49312011-05-25 Jakub Jelinek <jakub@redhat.com>
4932
4933 * c-common.c (def_fn_type): Remove extra va_end.
4934
7f506bca 49352011-05-23 Jason Merrill <jason@redhat.com>
4936
4937 PR c++/48106
4938 * c-common.c (c_common_get_narrower): New.
4939 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
4940
774e9d58 49412011-05-23 Nathan Froyd <froydnj@codesourcery.com>
4942
4943 * c-common.h (check_function_arguments): Tweak prototype of
4944 check_function_arguments.
4945 * c-common.c (check_function_arguments): Likewise. Adjust
4946 calls to check_function_nonnull, check_function_format, and
4947 check_function_sentinel.
4948 (check_function_sentinel): Take a FUNCTION_TYPE rather than
4949 separate attributes and typelist arguments. Use
4950 FOREACH_FUNCTION_ARGS to iterate over argument types.
4951
23407dc9 49522011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
4953
4954 * c-common.c (c_common_reswords): Reorder.
4955 * c-common.h (rid): Likewise.
4956
3a939d12 49572011-05-10 Nathan Froyd <froydnj@codesourcery.com>
4958
4959 * c-common.c (def_fn_type): Don't call build_function_type, call
4960 build_function_type_array or build_varargs_function_type_array
4961 instead.
4962 (c_common_nodes_and_builtins): Likewise.
4963
b6e3dd65 49642011-05-05 Nathan Froyd <froydnj@codesourcery.com>
4965
4966 * c-common.c (c_add_case_label): Omit the loc argument to
4967 build_case_label.
4968 * c-common.h (build_case_label): Remove.
4969 * c-semantics.c (build_case_label): Remove.
4970
4232a958 49712011-05-05 Joseph Myers <joseph@codesourcery.com>
4972
4973 * c-objc.h (objc_start_method_definition): Update prototype.
4974 * stub-objc.c (objc_start_method_definition): Add extra parameter.
4975
d0af78c5 49762011-05-04 Nathan Froyd <froydnj@codesourcery.com>
4977
4978 * c-common.c (check_main_parameter_types): Reindent. Don't use
4979 TYPE_ARG_TYPES directly.
4980 (handle_nonnull_attribute): Likewise.
4981 (sync_resolve_params): Likewise.
4982 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
4983 to check_format_string.
4984 (handle_format_attribute): Likewise.
4985 (check_format_string): Take a function type to examine instead of
4986 a type list. Use a function_arg_iterator to step through argument
4987 types.
4988
ceb7b692 49892011-05-04 Richard Guenther <rguenther@suse.de>
4990
4991 * c-common.c (fix_string_type): Use size_int for index type bounds.
4992 (start_fname_decls): Do not pass NULL to build_int_cst.
4993 (c_init_attributes): Likewise.
4994 * c-lex.c (c_lex_with_flags): Likewise.
4995
c66c81be 49962011-04-27 Jason Merrill <jason@redhat.com>
4997
4998 * c-common.c (make_tree_vector_from_list): New.
4999 * c-common.h: Declare it.
5000
16930c72 50012011-04-26 Richard Guenther <rguenther@suse.de>
5002
5003 PR preprocessor/48248
5004 * c-ppoutput.c (maybe_print_line): Always optimize newlines
5005 for output size with -P.
5006
23407dc9 50072011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
5008
5009 * c-common.c (struct c_common_resword): Add __underlying_type.
5010 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
5011
dd045aee 50122011-04-20 Jim Meyering <meyering@redhat.com>
5013
5014 * c-format.c (init_dollar_format_checking): Remove useless
5015 if-before-free.
5016
394dd737 50172011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
5018
5019 * c-objc.h (objc_get_interface_ivars): Removed.
23407dc9 5020 (objc_detect_field_duplicates): New.
394dd737 5021 * stub-objc.c: Likewise.
23407dc9 5022
a758bf7d 50232011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
5024
5025 * stub-objc.c (objc_declare_protocols): Renamed to
5026 objc_declare_protocol.
5027 * c-objc.h: Likewise.
23407dc9 5028
29d7200d 50292011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
5030
5031 * stub-objc.c (objc_declare_class): Updated argument name.
5032
9b88d08d 50332011-04-12 Nathan Froyd <froydnj@codesourcery.com>
5034
5035 * c-common.h (c_common_init_ts): Declare.
5036 * c-common.c (c_common_init_ts): Define.
5037
4185cf58 50382011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
5039
5040 * c-objc.h (objc_build_message_expr): Updated prototype.
5041 * stub-objc.c (objc_build_message_expr): Likewise.
19931eea 5042
5a90471f 50432011-04-12 Martin Jambor <mjambor@suse.cz>
5044
5045 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
5046 of cgraph_node.
5047
783bb57e 50482011-04-11 Richard Guenther <rguenther@suse.de>
5049
5050 * c-common.c (complete_array_type): Build a range type of
5051 proper type.
5052
c33080b9 50532011-04-08 Nathan Froyd <froydnj@codesourcery.com>
5054
5055 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
5056 (handle_type_generic_attribute): Likewise.
5057
f8913d47 50582011-04-07 Jason Merrill <jason@redhat.com>
5059
5060 PR c++/48450
5061 * c-common.c (c_common_truthvalue_conversion): Don't ignore
5062 conversion from C++0x scoped enum.
5063
c94b1d0e 50642011-04-06 Joseph Myers <joseph@codesourcery.com>
5065
5066 * c-target-def.h: New file.
5067 * c-target.def: New file.
5068 * c-target.h: New file.
5069 * c-common.c (targetcm): Don't define here.
5070 * c-common.h (default_handle_c_option): Declare.
5071 * c-format.c: Include c-target.h instead of target.h.
5072 * c-opts.c: Include c-target.h instead of target.h. Explicitly
5073 include tm.h.
5074 (default_handle_c_option): Move from targhooks.c.
5075
acb10f41 50762011-03-29 Jakub Jelinek <jakub@redhat.com>
5077
5078 PR preprocessor/48248
5079 * c-ppoutput.c (print): Add src_file field.
5080 (init_pp_output): Initialize it.
5081 (maybe_print_line): Don't optimize by adding up to 8 newlines
5082 if map->to_file and print.src_file are different file.
5083 (print_line): Update print.src_file.
5084
82715bcd 50852011-03-25 Kai Tietz <ktietz@redhat.com>
5086
5087 * c-ada-spec.c (compare_comment): Use filename_cmp
5088 instead of strcmp for filename.
5089
451c8e2f 50902011-03-25 Jeff Law <law@redhat.com>
5091
1f78217c 5092 * c-common.c (def_fn_type): Add missing va_end.
451c8e2f 5093
3c47771c 50942011-03-25 Jason Merrill <jason@redhat.com>
5095
5096 * c.opt: Add -std=c++03.
5097
97e6200f 50982011-03-22 Eric Botcazou <ebotcazou@adacore.com>
5099
5100 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
5101
ac86af5d 51022011-03-17 Kai Tietz
5103
5104 PR target/12171
ee212425 5105 * c-pretty-print.c (pp_c_specifier_qualifier_list):
5106 Display allowed attributes for function pointer types.
5107 (pp_c_attributes_display): New function to display
5108 attributes having affects_type_identity flag set to true.
5109 * c-pretty-print.h (pp_c_attributes_display): New prototype.
5110
ac86af5d 5111 * c-common.c (c_common_attribute_table):
5112 Add new element.
5113 (c_common_format_attribute_table): Likewise.
5114
914d1151 51152011-03-18 Jason Merrill <jason@redhat.com>
5116
69788bdf 5117 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
5118 * c-common.h: Don't declare it here.
5119 * c-common.c: Or define it here.
5120 * c-opts.c (c_common_handle_option): Or set it here.
5121
914d1151 5122 PR c++/35315
5123 * c-common.c (handle_transparent_union_attribute): Don't
5124 make a duplicate type in C++.
5125
54cf6eed 51262011-03-15 Jason Merrill <jason@redhat.com>
5127
5128 * c-common.c (max_constexpr_depth): New.
5129 * c-common.h: Declare it.
5130 * c-opts.c (c_common_handle_option): Set it.
5131 * c.opt (fconstexpr-depth): New option.
5132
02cb1060 51332011-03-11 Jason Merrill <jason@redhat.com>
5134
9bf1c74e 5135 * c-common.c (attribute_takes_identifier_p): Add missing const.
5136
02cb1060 5137 PR c++/46803
5138 * c-common.c (attribute_takes_identifier_p): Assume that an
5139 unknown attribute takes an identifier.
5140
ecf2703d 51412011-03-07 Nathan Froyd <froydnj@codesourcery.com>
5142
5143 PR c/47786
5144 * c-common.c (c_type_hash): Call list_length instead of iterating
5145 through DECL_CHAIN. Rename 'i' to 'n_elements'.
5146
2b19dfe4 51472011-02-19 Jakub Jelinek <jakub@redhat.com>
5148
5149 PR c/47809
5150 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
5151
29cf2335 51522011-02-17 Iain Sandoe <iains@gcc.gnu.org>
5153
5154 * c.opt (fobjc-abi-version=) New.
5155 (fobjc-nilcheck): New.
5156
fad3f658 51572011-02-03 Nathan Froyd <froydnj@codesourcery.com>
5158
5159 PR c++/46890
5160 * c-common.h (keyword_is_decl_specifier): Declare.
5161 * c-common.c (keyword_is_decl_specifier): Define.
5162 (keyword_is_function_specifier): New function.
5163
a12319b3 51642011-01-26 Jakub Jelinek <jakub@redhat.com>
5165
5166 PR c/47473
5167 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
5168 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
5169 REAL_TYPE.
5170
5c128dc8 51712011-01-26 Arnaud Charlet <charlet@adacore.com>
5172
5173 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
5174
8d67b0c7 51752011-01-26 Jakub Jelinek <jakub@redhat.com>
5176
5177 PR pch/47430
5178 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
5179 after init_c_lex if pch_file is set.
5180
0675168d 51812011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
5182
e8911163 5183 PR c++/43601
0675168d 5184 * c.opt (-fkeep-inline-dllexport): New switch.
5185
0725e25c 51862011-01-12 Richard Guenther <rguenther@suse.de>
5187
5188 PR middle-end/32511
5189 * c-common.c (handle_weak_attribute): Warn instead of error
5190 on declaring an inline function weak.
5191
fdd84b77 51922011-01-05 Tom Tromey <tromey@redhat.com>
5193
5194 * c-common.h (lvalue_error): Update.
5195 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
5196 not error.
5197
e6e73d14 51982010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
19931eea 5199
d67e8485 5200 PR objc/47075
5201 * c-objc.h (objc_finish_message_expr): Added argument to
5202 prototype.
5203
a36cf284 52042010-12-22 Nathan Froyd <froydnj@codesourcery.com>
5205
5206 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
5207 Use prototype_p.
5208
33b3681f 52092010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
5210
5211 * c-objc.h (objc_maybe_warn_exceptions): New.
19931eea 5212 * stub-objc.c (objc_maybe_warn_exceptions): New.
33b3681f 5213
a1f90215 52142010-12-10 Nathan Froyd <froydnj@codesourcery.com>
5215
5216 * c-common.h (readonly_error): Declare.
5217 * c-common.c (readonly_error): Define.
5218
b1bbc8e5 52192010-12-09 Nathan Froyd <froydnj@codesourcery.com>
5220
5221 * c-common.h (invalid_indirection_error): Declare.
5222 * c-common.c (invalid_indirection_error): Define.
5223
b0d55af9 52242010-12-03 Richard Guenther <rguenther@suse.de>
5225
5226 PR c/46745
5227 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
5228 (pp_c_unary_expression): Likewise.
5229 (pp_c_expression): Likewise.
5230
d7489d8d 52312010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
5232
5233 * c-common.h (objc_finish_function): New.
5234 (objc_non_volatilized_type): Removed.
5235 (objc_type_quals_match): Removed.
5236 * stub-objc.c (objc_finish_function): New.
5237 (objc_non_volatilized_type): Removed.
5238 (objc_type_quals_match): Removed.
19931eea 5239
92468061 52402010-11-30 Joseph Myers <joseph@codesourcery.com>
5241
5242 * c-common.h (parse_optimize_options): Declare.
5243 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
5244 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
5245
967958e4 52462010-11-29 Joseph Myers <joseph@codesourcery.com>
5247
5248 * c-opts.c (check_deps_environment_vars): Use getenv instead of
5249 GET_ENVIRONMENT.
5250 * c-pch.c (O_BINARY): Don't define here.
5251 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
5252
b213bf24 52532010-11-25 Joseph Myers <joseph@codesourcery.com>
5254
5255 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
5256 targetm.except_unwind_info.
5257
9faf44d6 52582010-11-23 Joseph Myers <joseph@codesourcery.com>
5259
5260 * c-opts.c (c_common_handle_option): Pass location to
5261 set_struct_debug_option.
5262
79396169 52632010-11-23 Joseph Myers <joseph@codesourcery.com>
5264
5265 * c-common.c (visibility_options): Move from ../opts.c.
5266 * c-common.h (struct visibility_flags, visibility_options):
5267 Declare here.
5268 * c-opts.c (finish_options): Rename to c_finish_options.
5269 (c_common_init): Update call to finish_options.
5270
b4aa4123 52712010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
5272
5273 PR objc/34033
5274 * c-lex.c (lex_string): Check that each string in an Objective-C
5275 string concat sequence starts with either one or zero '@', and
5276 that there are no spurious '@' signs at the end.
5277
3e0e49f2 52782010-11-20 Joseph Myers <joseph@codesourcery.com>
5279
5280 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
5281 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
5282 HANDLE_PRAGMA_VISIBILITY.
5283 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
5284 HANDLE_PRAGMA_VISIBILITY): Don't define.
5285 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
5286
a9ffdd35 52872010-11-20 Nathan Froyd <froydnj@codesourcery.com>
5288
5289 PR c++/16189
5290 PR c++/36888
5291 PR c++/45331
5292 * c-common.h (keyword_begins_type_specifier): Declare.
5293 (keyword_is_storage_class_specifier): Declare.
5294 (keyword_is_type_qualifier): Declare.
5295 * c-common.c (keyword_begins_type_specifier): New function.
5296 (keyword_is_storage_class_specifier): New function.
5297 (keyword_is_type_qualifier): Declare.
5298
93be21c0 52992010-11-19 Joseph Myers <joseph@codesourcery.com>
5300
5301 PR c/46547
5302 * c-common.c (in_late_binary_op): Define.
5303 (c_common_truthvalue_conversion): Check in_late_binary_op before
5304 calling c_save_expr.
5305 * c-common.h (in_late_binary_op): Declare.
5306
d7175aef 53072010-11-19 Joseph Myers <joseph@codesourcery.com>
5308
5309 * c-opts.c (c_common_handle_option): Update calls to
5310 set_struct_debug_option.
5311
c213e196 53122010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
5313
5314 * c-common.h (objc_declare_protocols): Added additional argument.
5315 * stub-objc.c (objc_declare_protocol): Same change.
19931eea 5316
0b5fc5d6 53172010-11-18 Nathan Froyd <froydnj@codesourcery.com>
5318
5319 PR c/33193
5320 * c-common.h (build_real_imag_expr): Declare.
5321 * c-semantics.c (build_real_imag_expr): Define.
5322
b8ba44e7 53232010-11-17 Joseph Myers <joseph@codesourcery.com>
5324
5325 * c-opts.c (c_common_parse_file): Take no arguments.
5326 * c-common.h (c_common_parse_file): Update prototype.
5327
6ef8d12f 53282010-11-16 Jakub Jelinek <jakub@redhat.com>
5329
5330 PR c++/46401
5331 * c-common.c (warning_candidate_p): Don't track non-const calls
5332 or STRING_CSTs.
5333
929d2a90 53342010-11-15 Ian Lance Taylor <iant@google.com>
5335
5336 * c-lex.c (init_c_lex): Set macro debug callbacks if
5337 flag_dump_go_spec is set.
5338
e4a7640a 53392010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
5340
5341 * c-common.h (objc_build_incr_expr_for_property_ref): New.
5342 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
5343
597d2d81 53442010-11-15 Nathan Froyd <froydnj@codesourcery.com>
5345
5346 PR preprocessor/45038
5347 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
5348 dialects.
5349
c123f04d 53502010-11-12 Joseph Myers <joseph@codesourcery.com>
5351
5352 * c-common.h (c_family_lang_mask): Declare.
5353 * c-opts.c (c_family_lang_mask): Make extern.
5354 * c-pragma.c (handle_pragma_diagnostic): Use
5355 control_warning_option.
5356
3c6c0e40 53572010-11-12 Joseph Myers <joseph@codesourcery.com>
5358
5359 * c-common.c (parse_optimize_options): Update call to
5360 decode_options.
5361 * c-common.h (c_common_handle_option): Update prototype.
5362 * c-opts.c (c_common_handle_option): Take location_t parameter and
5363 pass it to other functions.
5364
19ec5c9e 53652010-11-11 Joseph Myers <joseph@codesourcery.com>
5366
5367 * c-opts.c (warning_as_error_callback): Remove.
5368 (c_common_initialize_diagnostics): Don't call
5369 register_warning_as_error_callback.
5370 (c_common_handle_option): Handle -Werror=normalized= here.
5371
bf776685 53722010-11-10 Joseph Myers <joseph@codesourcery.com>
5373
5374 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
5375 in diagnostic.
5376 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
5377 letter.
5378 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
5379 Remove trailing '.' from diagnostics.
5380 * c.opt (Wwrite-strings_: Avoid '`' in help text.
5381
6bd9d862 53822010-11-10 Joseph Myers <joseph@codesourcery.com>
5383
5384 * c-common.c (parse_optimize_options): Pass global_dc to
5385 decode_options.
5386 * c-opts.c (c_common_handle_option): Pass &global_options to
5387 set_Wstrict_aliasing.
5388 * c.opt (v): Don't mark Common or document here.
5389
1f6616ee 53902010-11-06 Iain Sandoe <iains@gcc.gnu.org>
5391
5392 PR target/44981
5393 * c-format.c (format_type): New type gcc_objc_string_format_type.
5394 (valid_stringptr_type_p): New.
5395 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
19931eea 5396 (check_format_string): Pass expected type, use
1f6616ee 5397 valid_stringptr_type_p (), check that the format string types are
5398 consistent with the format specification.
5399 (decode_format_attr): Warn if NSString is used outside objective-c.
5400 (format_types_orig): Add NSString.
5401 (format_name): New.
5402 (format_flags): New.
5403 (check_format_arg): Handle format strings requiring an external parser.
5404 first_target_format_type: New variable.
5405 (handle_format_attribute): Set up first_target_format_type, pass the
5406 expected format arg string type to check_format_string().
5407 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
5408 * stub-objc.c (objc_string_ref_type_p): New.
5409 (objc_check_format_arg): New.
5410
b0d0931f 54112010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
5412
19931eea 5413 Fixed using the Objective-C 2.0 dot-syntax with class names.
b0d0931f 5414 * c-common.h (objc_build_class_component_ref): New.
5415 * stub-objc.c (objc_build_class_component_ref): New.
5416
f26877d5 54172010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
5418
5419 * c.opt (Wproperty-assign-default): New option.
5420
1ef143b6 54212010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
5422
5423 Implemented -fobjc-std=objc1 flag.
5424 * c.opt (fobjc-std=objc1): New option.
5425
8c582e4f 54262010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
5427
5428 Implemented format and noreturn attributes for Objective-C methods.
5429 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
5430 attribute for Objective-C methods.
5431
8637f1db 54322010-10-31 Jason Merrill <jason@redhat.com>
5433
5434 * c-common.c (conversion_warning, warn_for_collisions_1): Use
5435 EXPR_LOC_OR_HERE.
5436
9d9f5bb3 54372010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
5438
5439 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
5440 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
5441 (objc_add_property_declaration): Removed arguments for copies and
5442 ivar.
5443 (objc_build_getter_call): Renamed to
5444 objc_maybe_build_component_ref.
5445 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
5446 (objc_is_property_ref): New.
5447 * c-common.c (c_common_reswords): Removed copies and ivar.
5448 * stub-objc.c (objc_add_property_declaration): Removed arguments
5449 for copies and ivar.
5450 (objc_build_getter_call): Renamed to
5451 objc_maybe_build_component_ref.
5452 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
5453 (objc_is_property_ref): New.
19931eea 5454
56f907a0 54552010-10-29 Arnaud Charlet <charlet@adacore.com>
5456 Matthew Gingell <gingell@adacore.com>
5457
5458 * c-ada-spec.c (separate_class_package): New function.
5459 (pp_ada_tree_identifier): Prefix references to C++ classes with the
5460 name of their enclosing package.
5461 (print_ada_declaration): Use separate_class_package.
5462
b5fa273e 54632010-10-27 Jason Merrill <jason@redhat.com>
5464
5290e253 5465 * c-common.c (c_common_reswords): Add __is_literal_type.
5466 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
5467
b5fa273e 5468 * c-common.c (check_case_value): Remove special C++ code.
5469
7590f0e5 54702010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
5471
5472 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
5473 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
5474 and RID_LAST_PATTR.
5475 (objc_add_property_declaration): Added additional arguments.
5476 (objc_property_attribute_kind): Removed.
5477 (objc_set_property_attr): Removed.
5478 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
5479 copy and nonatomic.
5480 * stub-objc.c (objc_add_property_declaration): Added additional
5481 arguments.
5482 (objc_set_property_attr): Removed.
19931eea 5483
1d894bcf 54842010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
5485
5486 * c-common.h (objc_add_property_variable): Renamed to
5487 objc_add_property_declaration. Added location argument.
5488 * stub-objc.c (objc_add_property_variable): Same change.
8204c077 5489
e23bf1fb 54902010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
5491
5492 * c-common.h (objc_maybe_printable_name): New.
5493 * stub-objc.c (objc_maybe_printable_name): New.
5494
93426222 54952010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
5496 Andrew Pinski <pinskia@gmail.com>
5497
5498 * c-common.h (c_common_mark_addressable_vec): Declare.
5499 * c-common.c (c_common_mark_addressable_vec): New function.
5500
45b2b110 55012010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
5502
5503 * c-common.h (objc_set_method_type): Removed.
5504 (objc_add_method_declaration): Added boolean argument.
5505 (objc_start_method_definition): Same change.
5506 (objc_build_method_signature): Same change.
5507 * stub-objc.c (objc_set_method_type): Removed.
5508 (objc_add_method_declaration): Added boolean argument.
5509 (objc_start_method_definition): Same change.
5510 (objc_build_method_signature): Same change.
5511
64cd9619 55122010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
5513
5514 * c-common.h (finish_file): Removed.
5515 (objc_write_global_declarations): New.
5516 * c-opts.c (c_common_parse_file): Do not call finish_file.
5517 * stub-objc.c (objc_write_global_declarations): New.
19931eea 5518
e1f293c0 55192010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
5520
5521 Implemented parsing @synthesize and @dynamic for
5522 Objective-C/Objective-C++.
5523 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
5524 (objc_add_synthesize_declaration): New.
5525 (objc_add_dynamic_declaration): New.
5526 * c-common.c (c_common_reswords): Add synthesize and dynamic.
5527 * stub-objc.c (objc_add_synthesize_declaration): New.
5528 (objc_add_dynamic_declaration): New.
19931eea 5529
ef97a312 55302010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
5531
5532 PR target/46041
5533 * c-cppbuiltin.c (mode_has_fma): Move function here from
5534 builtins.c. Don't use the fma optab, instead just use the
5535 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
5536 using -save-temps.
5537
69b07042 55382010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
5539
5540 Merge from 'apple/trunk' branch on FSF servers.
ef97a312 5541
69b07042 5542 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
5543
19931eea 5544 Radar 4330422
69b07042 5545 * c-common.h (objc_non_volatilized_type): New declaration
5546 * stub-objc.c (objc_non_volatilized_type): New stub.
5547
f15f2e56 55482010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
5549
69b07042 5550 Merge from 'apple/trunk' branch on FSF servers.
f15f2e56 5551
5552 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
5553
19931eea 5554 Radar 4133425
f15f2e56 5555 * c-common.h (objc_diagnose_private_ivar): New decl.
ef97a312 5556 * stub-objc.c (objc_diagnose_private_ivar): New stub.
f15f2e56 5557
4a8875ed 55582010-10-17 Iain Sandoe <iains@gcc.gnu.org>
5559
5560 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
5561 * c-common.h (enum rid): Add RID_AT_PACKAGE.
5562 (objc_ivar_visibility_kind): New enum.
5563 (objc_set_visibility): Adjust prototype to use visibility enum.
ef97a312 5564 * stub-objc.c (objc_set_visibility): Adjust stub to use
4a8875ed 5565 visibility enum.
5566
7e0713b1 55672010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
5568
5569 * c-cppbuiltin.c (builtin_define_float_constants): Emit
5570 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
5571 has the appropriate fma builtins.
5572 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
5573
86c110ac 55742010-10-14 Iain Sandoe <iains@gcc.gnu.org>
5575
7e0713b1 5576 merge from FSF apple 'trunk' branch.
86c110ac 5577 2006 Fariborz Jahanian <fjahanian@apple.com>
7e0713b1 5578
86c110ac 5579 Radars 4436866, 4505126, 4506903, 4517826
5580 * c-common.c (c_common_resword): Define @property and its attributes.
5581 * c-common.h: Define property attribute enum entries.
5582 (OBJC_IS_PATTR_KEYWORD): New.
5583 (objc_property_attribute_kind): New enum.
5584 Declare objc_set_property_attr (), objc_add_property_variable (),
5585 objc_build_getter_call () and objc_build_setter_call ().
5586 * stub-objc.c (objc_set_property_attr): New stub.
5587 (objc_add_property_variable): Likewise.
5588 (objc_build_getter_call): Likewise.
5589 (objc_build_setter_call) Likewise.
7e0713b1 5590
40c8d1dd 55912010-10-13 Iain Sandoe <iains@gcc.gnu.org>
5592
7e0713b1 5593 merge from FSF apple 'trunk' branch.
40c8d1dd 5594 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
5595
5596 Radar 3803157 (method attributes)
5597 * c-common.c (handle_deprecated_attribute): Recognize
5598 objc methods as valid declarations.
5599 * c-common.h: Declare objc_method_decl ().
7e0713b1 5600 * stub-objc.c (objc_method_decl): New stub.
40c8d1dd 5601
f3f006ad 56022010-10-08 Joseph Myers <joseph@codesourcery.com>
5603
5604 * c-common.c (parse_optimize_options): Call
5605 decode_cmdline_options_to_array_default_mask before
5606 decode_options. Update arguments to decode_options.
5607 * c-common.h (c_common_init_options_struct): Declare.
5608 * c-opts.c (c_common_init_options_struct): New. Split out from
5609 c_common_init_options.
5610
0a65c3bb 56112010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
5612
5613 Implemented fast enumeration for Objective-C.
5614 * c-common.h (objc_finish_foreach_loop): New.
5615 * stub-objc.c (objc_finish_foreach_loop): New.
5616
24ca3b4e 56172010-10-05 Joseph Myers <joseph@codesourcery.com>
5618
5619 * c-common.h (struct diagnostic_context): Don't declare here.
5620 (c_common_initialize_diagnostics): Declare using
5621 diagnostic_context typedef.
5622 * c-opts.c (c_common_handle_option): Pass global_dc to
5623 handle_generated_option.
5624
f83b64ca 56252010-10-04 Joseph Myers <joseph@codesourcery.com>
5626
5627 * c-opts.c (c_common_handle_option): Pass &global_options_set to
5628 handle_generated_option.
5629
2fdec027 56302010-10-03 Ian Lance Taylor <iant@google.com>
5631
5632 * c.opt (-fplan9-extensions): New option.
5633
41acdfa4 56342010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5635
5636 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
5637 Remove.
5638 (c_cpp_builtins): Call functions from cppbuiltin.c instead
5639 of duplicating code.
5640
069761fb 56412010-09-30 Iain Sandoe <iains@gcc.gnu.org>
5642
5643 * c-common.c: Add two new entries for @optional
5644 and @required keywords.
5645
5646 merge from FSF 'apple/trunk' branch.
5647 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
5648
5649 Radar 4386773
5650 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
5651 objective-c keywords.
5652 (objc_set_method_opt): New declaration.
5653 * stub-objc.c (objc_set_method_opt): New stub.
19931eea 5654
2c5d2e39 56552010-09-30 Joseph Myers <joseph@codesourcery.com>
5656
5657 * c-common.c (handle_optimize_attribute): Pass &global_options to
5658 cl_optimization_save and cl_optimization_restore.
5659 * c-opts.c (c_common_handle_option): Pass &global_options to
5660 handle_generated_option.
5661 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
5662 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
5663 &global_options to cl_optimization_restore.
5664
e5c75ac3 56652010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
5666
5667 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
5668 Objective-C/Objective-C++ keywords.
5669
3511333e 56702010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
e147d6aa 5671
19931eea 5672 Merge from 'apple/trunk' branch on FSF servers.
5673
e147d6aa 5674 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
5675
5676 Radar 4281748
5677 * c-common.h (objc_check_global_decl): New declaration.
5678 * stub-objc.c (objc_check_global_decl): New stub.
5679
5461e683 56802010-09-29 Joseph Myers <joseph@codesourcery.com>
5681
5682 * c.opt: Don't use VarExists.
5683
5ae82d58 56842010-09-29 Joseph Myers <joseph@codesourcery.com>
5685
5686 * c-common.c (c_cpp_error): Update names of diagnostic_context
5687 members.
5688 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
5689 cl_optimization members.
5690 * c-opts.c (warning_as_error_callback, c_common_handle_option,
5691 sanitize_cpp_opts, finish_options): Update names of cpp_options
5692 members.
5693
b27e241e 56942010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
5695
5696 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
5697 (objc_is_reserved_word): Removed.
5698 * c-common.c: Updated comments.
5699 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
5700 objc_is_reserved_word.
5701 * stub-objc.c (objc_is_reserved_word): Removed.
5702
03fc2271 57032010-09-28 Iain Sandoe <iains@gcc.gnu.org>
5704
19931eea 5705 * c-common.h (objc_add_method_declaration): Adjust prototype to
03fc2271 5706 include attributes.
5707 (objc_start_method_definition): Likewise.
5708 (objc_build_keyword_decl): Likewise.
5709 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
5710 (objc_start_method_definition): Likewise.
5711 (objc_build_keyword_decl): Likewise.
5712
a336eb4b 57132010-09-28 Iain Sandoe <iains@gcc.gnu.org>
5714
5715 * c-common.h (objc_start_class_interface): Adjust prototype.
5716 (objc_start_category_interface): Likewise.
5717 (objc_start_protocol): Likewise.
5718 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
5719 (objc_start_class_interface): Likewise.
5720 (objc_start_category_interface): Likewise.
5721
48b14f50 57222010-09-27 Ian Lance Taylor <iant@google.com>
5723
5724 * c-common.c (c_common_attribute_table): Add no_split_stack.
5725 (handle_no_split_stack_attribute): New static function.
5726
4abfc532 57272010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
5728
19931eea 5729 Merge from 'apple/trunk' branch on FSF servers.
4abfc532 5730
5731 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
5732
19931eea 5733 Radar 4229905
4abfc532 5734 * c-common.h (objc_have_common_type): New declaration.
5735 * stub-objc.c (objc_have_common_type): New stub.
5736
5737 2005-06-22 Ziemowit Laski <zlaski@apple.com>
5738
5739 Radar 4154928
5740 * c-common.h (objc_common_type): New prototype.
19931eea 5741 * stub-objc.c (objc_common_type): New stub.
4abfc532 5742
7bd95dfd 57432010-09-24 Jan Hubicka <jh@suse.cz>
5744
5745 * c-common.c (handle_leaf_attribute): New function.
5746 (struct attribute_spec c_common_att): Add leaf.
5747
5789e05b 57482010-09-22 Joseph Myers <joseph@codesourcery.com>
5749
5750 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
5751 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
5752 -dump, -dump=, -imacros, -imacros=, -include, -include=,
5753 -include-barrier, -include-directory, -include-directory=,
5754 -include-directory-after, -include-directory-after=,
5755 -include-prefix, -include-prefix=, -include-with-prefix,
5756 -include-with-prefix=, -include-with-prefix-after,
5757 -include-with-prefix-after=, -include-with-prefix-before,
5758 -include-with-prefix-before=, -no-integrated-cpp,
5759 -no-line-commands, -no-standard-includes, -no-warnings, -output,
5760 -output=, -pedantic, -pedantic-errors, -preprocess,
5761 -print-missing-file-dependencies, -trace-includes, -traditional,
5762 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
5763 -user-dependencies, -verbose, -write-dependencies,
5764 -write-user-dependencies, no-integrated-cpp, traditional): New.
5765
e6fb54ba 57662010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
5767
5768 PR objc/23710
9b60f3b0 5769 * c-common.h (objc_start_method_definition): Return bool instead
5770 of void.
5771 * stub-objc.c (objc_start_method_definition): Return bool instead
5772 of void.
5773
57742010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
5775
5776 PR objc/25965
5777 * c-common.h (objc_get_interface_ivars): New declaration.
5778 * stub-objc.c (objc_get_interface_ivars): New stub.
e6fb54ba 5779
e44b0a1f 57802010-09-15 Ian Lance Taylor <iant@google.com>
5781
5782 * c-common.c (parse_optimize_options): Do not capitalize warning
ebd7c4c1 5783 messages. Remove period at end of warning message.
e44b0a1f 5784
85c0a25c 57852010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5786
5787 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
5788 (handle_alias_attribute): ... here.
5789 (handle_ifunc_attribute): New.
5790
5ba33bf4 57912010-09-06 Mark Mitchell <mark@codesourcery.com>
5792
5793 * c-common.h (do_warn_double_promotion): Declare.
5794 * c-common.c (do_warn_double_promotion): Define.
5795
c920faa3 57962010-09-05 Mark Mitchell <mark@codesourcery.com>
5797
5798 * c.opt (Wdouble-promotion): New.
5799
9604e070 58002010-09-02 Joseph Myers <joseph@codesourcery.com>
5801
5802 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
5803 fvtable-thunks, fxref): Mark no longer supported in help text.
5804
3b0273a1 58052010-09-02 Joseph Myers <joseph@codesourcery.com>
5806
5807 * c.opt (Wimport, fall-virtual, falt-external-templates,
5808 fdefault-inline, fenum-int-equiv, fexternal-templates,
5809 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
5810 fname-mangling-version-, fnew-abi, fnonnull-objects,
5811 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
5812 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
5813 applicable.
5814 (fhandle-exceptions): Mark with Alias and Warn.
5815 * c-opts.c (c_common_handle_option): Don't handle options marked
5816 as ignored.
5817
67089c6b 58182010-09-02 Joseph Myers <joseph@codesourcery.com>
5819
5820 * c.opt (Wcomments, Werror-implicit-function-declaration,
5821 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
5822 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
5823 aliases.
5824 * c-common.c (option_codes): Use OPT_Wcomment instead of
5825 OPT_Wcomments.
5826 * c-opts.c (warning_as_error_callback, c_common_handle_option):
5827 Don't handle options marked as aliases.
5828
2af087f2 58292010-08-25 Richard Guenther <rguenther@suse.de>
5830
5831 * c-common.c (c_common_get_alias_set): Remove special
5832 handling for pointers.
5833
48148244 58342010-08-20 Nathan Froyd <froydnj@codesourcery.com>
5835
5836 * c-common.c: Use FOR_EACH_VEC_ELT.
5837 * c-gimplify.c: Likewise.
5838 * c-pragma.c: Likewise.
5839
89c69892 58402010-08-16 Joseph Myers <joseph@codesourcery.com>
5841
5842 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
5843 RejectDriver.
5844 (MMDX): Change back to MMD. Mark NoDriverArg instead of
5845 RejectDriver.
5846 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
5847 instead of OPT_MDX and OPT_MMDX.
5848
e28aa114 58492010-08-16 Joseph Myers <joseph@codesourcery.com>
5850
5851 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
5852
99b66d21 58532010-08-12 Joseph Myers <joseph@codesourcery.com>
5854
5855 * c.opt (MD, MMD): Change to MDX and MMDX.
5856 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
5857
666f4bf0 58582010-08-11 Joseph Myers <joseph@codesourcery.com>
5859
5860 * c-opts.c (c_common_handle_option): Call handle_generated_option
5861 instead of handle_option.
5862
5ec815f6 58632010-08-08 Nathan Froyd <froydnj@codesourcery.com>
5864
5865 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
5866 (maybe_apply_renaming_pragma): Delete unneeded declarations.
5867
d13143cf 58682010-08-08 Nathan Froyd <froydnj@codesourcery.com>
5869
5870 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
5871 (pending_redefine_extname): Change type to a VEC.
5872 (add_to_renaming_pragma_list): Update for new type of
5873 pending_redefine_extname.
5ec815f6 5874 (maybe_apply_renaming_pragma): Likewise.
d13143cf 5875
2008c983 58762010-08-04 Arnaud Charlet <charlet@adacore.com>
5877
5878 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
5879 visited.
5880 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
5881 decide whether a type has already been declared/seen.
5882 Do not go to the original type.
5883 (dump_nested_types): New parameter forward.
5884 Generate forward declaration if needed and mark type as visited.
5885 (print_ada_declaration): Call dump_nested_types if not already done.
5886 Mark types as visited.
5887
9b091a73 58882010-08-03 Joseph Myers <joseph@codesourcery.com>
5889
5890 * c.opt (-print-pch-checksum): Remove option.
5891 * c-opts.c (c_common_handle_option): Don't handle
5892 OPT_print_pch_checksum.
5893
b78351e5 58942010-07-27 Joseph Myers <joseph@codesourcery.com>
5895
5896 * c-common.h (c_common_handle_option): Update prototype and return
5897 value type.
5898 * c-opts.c (c_common_handle_option): Update prototype and return
5899 value type. Update calls to handle_option and
5900 enable_warning_as_error.
5901
34416a90 59022010-07-27 Jakub Jelinek <jakub@redhat.com>
5903
5904 PR c/45079
5905 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
5906
fecf9011 59072010-07-27 Joseph Myers <joseph@codesourcery.com>
5908
5909 * c-common.h (c_common_missing_argument): Remove.
5910 * c-opts.c (c_common_missing_argument): Remove.
5911 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
5912 idirafter, imacros, include, isysroot, isystem, iquote): Add
5913 MissingArgError.
5914 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
5915
e88d34f6 59162010-07-27 Joseph Myers <joseph@codesourcery.com>
5917
5918 * c-common.h (c_common_option_lang_mask,
5919 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
5920 New.
5921 (c_common_init_options): Update prototype.
5922 * c-opts.c (c_common_option_lang_mask): New.
5923 (c_common_initialize_diagnostics): Split out of
5924 c_common_init_options.
5925 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
5926 New.
5927 (c_common_init_options): Update prototype. Use decoded options in
5928 search for -lang-asm.
5929
1767a056 59302010-07-15 Nathan Froyd <froydnj@codesourcery.com>
5931
5932 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
5933 * c-format.c: Likewise.
5934
0b205f4c 59352010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
5936
5937 * c-common.h: Include diagnostic-core.h. Error if already
5938 included.
5939 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
5940
1c58e3f1 59412010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
5942
1f78217c 5943 * c-common.c (IN_GCC_FRONTEND): Do not undef.
1c58e3f1 5944 Do not include expr.h
5945 (vector_mode_valid_p): Move here.
5946
33cc157c 59472010-06-21 DJ Delorie <dj@redhat.com>
5948
5949 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
5950 allow these pragmas anywhere.
5951
59522010-06-14 Jakub Jelinek <jakub@redhat.com>
5953
5954 PR bootstrap/44509
5955 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
5956 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
5957 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
5958 ggc_strdup instead of xstrdup.
5959
59602010-06-10 Jakub Jelinek <jakub@redhat.com>
5961
5962 * c-cppbuiltin.c: Include cpp-id-data.h.
5963 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
5964 (lazy_hex_fp_value): New function.
5965 (builtin_define_with_hex_fp_value): Provide definitions lazily.
5966
9b40bfbf 59672010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
5968
5969 * c-gimplify.c: Do not include tree-flow.h
5970
202d6e5f 59712010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
5972
5973 PR other/44034
5974 * c-common.c: Rename targetm member:
5975 targetm.enum_va_list -> targetm.enum_va_list_p
5976
d3237426 59772010-06-28 Anatoly Sokolov <aesok@post.ru>
5978
5979 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
5980
596981c8 59812010-06-28 Steven Bosscher <steven@gcc.gnu.org>
5982
5983 * c-cppbuiltin.c: Do not include except.h.
5984
b9bdfa0b 59852010-06-24 Andi Kleen <ak@linux.intel.com>
5986
19931eea 5987 * c-common.c (warn_for_omitted_condop): New.
5988 * c-common.h (warn_for_omitted_condop): Add prototype.
b9bdfa0b 5989
55ad092d 59902010-06-21 Joseph Myers <joseph@codesourcery.com>
5991
5992 * c.opt (lang-objc): Remove.
5993 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
5994
9e7c2572 59952010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
5996
5997 * c-opts.c: Include "tm_p.h".
5998
615ef0bb 59992010-06-20 Joseph Myers <joseph@codesourcery.com>
6000
6001 * c-common.c (parse_optimize_options): Update call to
6002 decode_options.
6003
aef48c9a 60042010-06-18 Nathan Froyd <froydnj@codesourcery.com>
6005
6006 * c-common.c (record_types_used_by_current_var_decl): Adjust for
6007 new type of types_used_by_cur_var_decl.
6008
d74003b4 60092010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
6010
6011 PR bootstrap/44512
6012 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
6013 for C++ standard compliance.
6014
1194d077 60152010-06-16 Jason Merrill <jason@redhat.com>
6016
6017 * c.opt: Add -Wnoexcept.
6018
d473d901 60192010-06-16 Richard Guenther <rguenther@suse.de>
6020
6021 PR c/44555
6022 * c-common.c (c_common_truthvalue_conversion): Remove
6023 premature and wrong optimization concering ADDR_EXPRs.
6024
b62dbfd3 60252010-06-15 Arnaud Charlet <charlet@adacore.com>
6026
6027 * c-ada-spec.c (dump_sloc): Remove column info.
6028 (is_simple_enum): New function.
6029 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
6030 enum types when relevant.
6031
200dd99c 60322010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
6033
19931eea 6034 * c-common.c (conversion_warning): Warn at expression
200dd99c 6035 location.
6036
abf6a617 60372010-06-10 Joseph Myers <joseph@codesourcery.com>
6038
6039 * c-opts.c (c_common_handle_option): Don't handle
6040 OPT_fshow_column.
6041
ba72912a 60422010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
6043
6044 * c-pragma.c (push_alignment): Use typed GC allocation.
6045 (handle_pragma_push_options): Likewise.
6046
6047 * c-common.c (parse_optimize_options): Likewise.
6048
6049 * c-common.h (struct sorted_fields_type): Add variable_size GTY
6050 option.
6051
4aafe913 60522010-06-07 Joseph Myers <joseph@codesourcery.com>
6053
6054 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
6055 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
6056 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
6057 flag_signed_bitfields, warn_strict_null_sentinel,
6058 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
6059 flag_gen_declaration, flag_no_gnu_keywords,
6060 flag_implement_inlines, flag_implicit_templates,
6061 flag_implicit_inline_templates, flag_optional_diags,
6062 flag_elide_constructors, flag_default_inline, flag_rtti,
6063 flag_conserve_space, flag_access_control, flag_check_new,
6064 flag_new_for_scope, flag_weak, flag_working_directory,
6065 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
6066 flag_enforce_eh_specs, flag_threadsafe_statics,
6067 flag_pretty_templates): Remove.
6068 * c-common.h (flag_preprocess_only, flag_nil_receivers,
6069 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
6070 flag_replace_objc_classes, flag_undef, flag_no_builtin,
6071 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
6072 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
6073 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
6074 flag_no_gnu_keywords, flag_implement_inlines,
6075 flag_implicit_templates, flag_implicit_inline_templates,
6076 flag_optional_diags, flag_elide_constructors, flag_default_inline,
6077 flag_rtti, flag_conserve_space, flag_access_control,
6078 flag_check_new, flag_new_for_scope, flag_weak,
6079 flag_working_directory, flag_use_cxa_atexit,
6080 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
6081 flag_threadsafe_statics, flag_pretty_templates,
6082 warn_strict_null_sentinel): Remove.
6083 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
6084 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
6085 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
6086 fimplicit-inline-templates, fimplicit-templates,
6087 flax-vector-conversions, fms-extensions, fnil-receivers,
6088 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
6089 frtti, fshort-double, fshort-enums, fshort-wchar,
6090 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
6091 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
6092 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
6093 gen-decls, undef): Use Var.
6094 (fdefault-inline, foptional-diags): Document as doing nothing.
6095 * c-opts.c (c_common_handle_option): Remove cases for options now
6096 using Var. Mark ignored options as such.
6097
7bedc3a0 60982010-06-05 Steven Bosscher <steven@gcc.gnu.org>
6099
19931eea 6100 * c-common.c: Moved to here from parent directory.
7bedc3a0 6101 * c-common.def: Likewise.
6102 * c-common.h: Likewise.
6103 * c-cppbuiltin.c: Likewise.
6104 * c-dump.c: Likewise.
6105 * c-format.c: Likewise.
6106 * c-format.h : Likewise.
6107 * c-gimplify.c: Likewise.
6108 * c-lex.c: Likewise.
6109 * c-omp.c: Likewise.
6110 * c.opt: Likewise.
6111 * c-opts.c: Likewise.
6112 * c-pch.c: Likewise.
6113 * c-ppoutput.c: Likewise.
6114 * c-pragma.c: Likewise.
6115 * c-pragma.h: Likewise.
6116 * c-pretty-print.c: Likewise.
6117 * c-pretty-print.h: Likewise.
6118 * c-semantics.c: Likewise.
6119 * stub-objc.c: Likewise.
6120
6121 * c-common.c: Include gt-c-family-c-common.h.
6122 * c-pragma.c: Include gt-c-family-c-pragma.h.
6123\f
f1717362 6124Copyright (C) 2010-2016 Free Software Foundation, Inc.
7bedc3a0 6125
6126Copying and distribution of this file, with or without modification,
6127are permitted in any medium without royalty provided the copyright
6128notice and this notice are preserved.