]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
Introduce cp_fold_rvalue.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
da562e32 12015-12-02 Jason Merrill <jason@redhat.com>
2
3 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4 (c_fully_fold_internal, decl_constant_value_for_optimization):
5 Move to c/c-fold.c.
6 * c-common.h: Don't declare decl_constant_value_for_optimization.
7
89f16034 82015-12-02 Joseph Myers <joseph@codesourcery.com>
9
10 PR c/68162
11 * c-common.h (c_build_qualified_type): Add extra default
12 arguments.
13
571b3486 142015-12-01 Julian Brown <julian@codesourcery.com>
15 Cesar Philippidis <cesar@codesourcery.com>
16 James Norris <James_Norris@mentor.com>
17
18 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
19 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
20 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
21
ed92a461 222015-11-30 Eric Botcazou <ebotcazou@adacore.com>
23
24 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
25 (decl_sloc_common): Delete and move bulk of processing to...
26 (decl_sloc): ...here.
27 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
28 (dump_ada_double_name): Remove S parameter and compute the suffix.
29 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
30 element type and deal with an anonymous one.
31 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
32 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
33 and remove reference to QUAL_UNION_TYPE.
34 (dump_nested_types): Make 2 passes on the fields and move bulk to...
35 (dump_nested_type): ...here. New function extracted from above.
36 Generate a full declaration for anonymous element type of arrays.
37 (print_ada_declaration): Really skip anonymous declarations. Remove
38 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
39 Clean up processing of declarations of array types and objects.
40 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
41 Remove obsolete code and tidy up.
42
c25b3e3f 432015-11-29 Jan Hubicka <hubicka@ucw.cz>
44
45 PR c/67581
46 * c-common.c (handle_transparent_union_attribute): Update
47 also type variants.
48
d4e328e9 492015-11-27 Martin Liska <mliska@suse.cz>
50
51 PR c++/68312
52 * array-notation-common.c (cilkplus_extract_an_triplets):
53 Release vector of vectors.
54 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
55
f63d9c4e 562015-11-26 Eric Botcazou <ebotcazou@adacore.com>
57
58 PR c++/68527
59 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
60 (print_ada_struct_decl): Likewise.
61
8d63c601 622015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
63
64 PR c++/68001
65 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
66 * cilk.c (recognize_spawn): Determine location in a more precise
67 way.
68
01f11119 692015-11-19 Jason Merrill <jason@redhat.com>
70
71 * c-common.c (shorten_compare): But look through macros from
72 system headers.
73
2d3d3af7 742015-11-18 Jason Merrill <jason@redhat.com>
75
76 * c-common.c (shorten_compare): Don't -Wtype-limits if the
77 non-constant operand comes from a macro.
78
7991eeee 792015-11-17 Jason Merrill <jason@redhat.com>
80
81 PR bootstrap/68346
82 * c-common.c (warn_tautological_cmp): Fold before checking for
83 constants.
84
73f67931 852015-11-16 Marek Polacek <polacek@redhat.com>
86
87 PR c++/68362
88 * c-common.c (check_case_bounds): Fold low and high cases.
89
8e539fdc 902015-11-16 Marek Polacek <polacek@redhat.com>
91
92 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
93 * c-common.c (c_common_get_alias_set): Likewise.
94 (handle_visibility_attribute): Likewise.
95
c58a4cfd 962015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
97
98 * c-common.c (handle_simd_attribute): New.
99 (struct attribute_spec): Add entry for "simd".
100 (handle_simd_attribute): New.
101
bb036391 1022015-11-13 Kai Tietz <ktietz70@googlemail.com>
103
104 * c-lex.c (interpret_float): Use fold_convert.
105
a96cefb2 1062015-11-13 David Malcolm <dmalcolm@redhat.com>
107
108 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
109 and store it on the result.
110 * c-opts.c (c_common_init_options): Set
111 global_dc->colorize_source_p.
112
2fc5e987 1132015-11-12 James Norris <jnorris@codesourcery.com>
114 Joseph Myers <joseph@codesourcery.com>
115
116 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
117 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
118 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
119 PRAGMA_OACC_CLAUSE_LINK.
120
81b1b2a8 1212015-11-11 Marek Polacek <polacek@redhat.com>
122
123 PR c/68107
124 PR c++/68266
125 * c-common.c (valid_array_size_p): New function.
126 * c-common.h (valid_array_size_p): Declare.
127
4f3707ca 1282015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
129
130 PR bootstrap/68271
131 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
132
6e803544 1332015-11-11 Andrew MacLeod <amacleod@redhat.com>
134
135 * array-notation-common.c: Remove unused header files.
136 * c-ada-spec.c: Likewise.
137 * c-cilkplus.c: Likewise.
138 * c-common.c: Likewise.
139 * c-cppbuiltin.c: Likewise.
140 * c-dump.c: Likewise.
141 * c-format.c: Likewise.
142 * c-gimplify.c: Likewise.
143 * c-indentation.c: Likewise.
144 * c-lex.c: Likewise.
145 * c-omp.c: Likewise.
146 * c-opts.c: Likewise.
147 * c-pch.c: Likewise.
148 * c-ppoutput.c: Likewise.
149 * c-pragma.c: Likewise.
150 * c-pretty-print.c: Likewise.
151 * c-semantics.c: Likewise.
152 * c-ubsan.c: Likewise.
153 * cilk.c: Likewise.
154 * stub-objc.c: Likewise.
155
a1b7fe4b 1562015-11-09 Thomas Schwinge <thomas@codesourcery.com>
157 Cesar Philippidis <cesar@codesourcery.com>
158 James Norris <jnorris@codesourcery.com>
159 Julian Brown <julian@codesourcery.com>
160 Nathan Sidwell <nathan@codesourcery.com>
161
162 * c-pragma.c (oacc_pragmas): Add "routine".
163 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
164
292237f3 1652015-11-08 Eric Botcazou <ebotcazou@adacore.com>
166
167 * c-common.c (c_common_attributes): Add scalar_storage_order.
168 (handle_scalar_storage_order_attribute): New function.
169 * c-pragma.c (global_sso): New variable.
170 (maybe_apply_pragma_scalar_storage_order): New function.
171 (handle_pragma_scalar_storage_order): Likewise.
172 (init_pragma): Register scalar_storage_order.
173 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
174 * c.opt (Wscalar-storage-order): New warning.
175 (fsso-struct=): New option.
176
b4a4c5fa 1772015-11-08 Martin Sebor <msebor@redhat.com>
178
179 * c.opt (Wplacement-new): Add a period to the end of a sentence.
180
ac677063 1812015-11-07 Richard Sandiford <richard.sandiford@arm.com>
182
183 * c-common.c: Don't undef DEF_BUILTIN.
184
f0479000 1852015-11-06 David Malcolm <dmalcolm@redhat.com>
186
187 * c-common.c (c_cpp_error): Convert parameter from location_t to
188 rich_location *. Eliminate the "column_override" parameter and
189 the call to diagnostic_override_column.
190 Update the "done_lexing" clause to set range 0
191 on the rich_location, rather than overwriting a location_t.
192 * c-common.h (c_cpp_error): Convert parameter from location_t to
193 rich_location *. Eliminate the "column_override" parameter.
194
ef014f95 1952015-11-05 Cesar Philippidis <cesar@codesourcery.com>
196 Thomas Schwinge <thomas@codesourcery.com>
197 James Norris <jnorris@codesourcery.com>
198
199 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
200 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
201 clauses with parallel and kernels and loops.
202 * c-pragma.h (enum pragma_omp_clause): Add entries for
203 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
204 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
205 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
206 INDEPENDENT,SEQ}.
207 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
208
e520488c 2092015-11-05 Martin Sebor <msebor@redhat.com>
210
211 PR c++/67942
212 * c.opt (-Wplacement-new): New option.
213
9561765e 2142015-11-05 Jakub Jelinek <jakub@redhat.com>
215
216 * c-common.h (c_finish_omp_atomic): Add TEST argument.
217 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
218 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
219 save_expr or create_tmp_var* if TEST is true.
220 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
221 Don't call add_stmt here.
222 (struct c_omp_check_loop_iv_data): New type.
223 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
224 c_omp_check_loop_iv_exprs): New functions.
225 (c_omp_split_clauses): Adjust for lastprivate being allowed on
226 distribute.
227 (c_omp_declare_simd_clauses_to_numbers): Change
228 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
229 (c_omp_declare_simd_clauses_to_decls): Similarly change those
230 from numbers to PARM_DECLs.
231
5e8689fb 2322015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
233
234 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
235 flag_checking.
236
aeaccb75 2372015-11-03 Bernd Schmidt <bschmidt@redhat.com>
238
239 PR c++-common/67882
240 * c-family/c-common.h (fold_offsetof_1): Add argument.
241 * c-family/c-common.c (fold_offsetof_1): Diagnose more invalid
242 offsetof expressions that reference elements past the end of
243 an array.
244
9e10bfb7 2452015-11-03 Thomas Schwinge <thomas@codesourcery.com>
246 Chung-Lin Tang <cltang@codesourcery.com>
247
248 * c-pragma.c (oacc_pragmas): Add "atomic".
249 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
250
ab50af2a 2512015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
252
253 * c-common.c (handle_target_clones_attribute): New.
254 (c_common_attribute_table): Add handle_target_clones_attribute.
255 (handle_always_inline_attribute): Add check on target_clones attribute.
256 (handle_target_attribute): Ditto.
257
4cba6f60 2582015-10-29 Andrew MacLeod <amacleod@redhat.com>
259
260 * array-notation-common.c: Reorder #include's and remove duplicates.
261 * c-ada-spec.c: Likewise.
262 * c-cilkplus.c: Likewise.
263 * c-common.c: Likewise.
264 * c-cppbuiltin.c: Likewise.
265 * c-dump.c: Likewise.
266 * c-format.c: Likewise.
267 * c-gimplify.c: Likewise.
268 * c-indentation.c: Likewise.
269 * c-lex.c: Likewise.
270 * c-omp.c: Likewise.
271 * c-opts.c: Likewise.
272 * c-pch.c: Likewise.
273 * c-ppoutput.c: Likewise.
274 * c-pragma.c: Likewise.
275 * c-pretty-print.c: Likewise.
276 * c-semantics.c: Likewise.
277 * c-ubsan.c: Likewise.
278 * cilk.c: Likewise.
279 * stub-objc.c: Likewise.
280
f576a2e4 2812015-10-28 Jason Merrill <jason@redhat.com>
282
283 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
284
2c4c8725 2852015-10-27 Thomas Schwinge <thomas@codesourcery.com>
286 James Norris <jnorris@codesourcery.com>
287 Cesar Philippidis <cesar@codesourcery.com>
288
289 PR c/64765
290 PR c/64880
291 * c-common.h (c_oacc_split_loop_clauses): Declare function.
292 * c-omp.c (c_oacc_split_loop_clauses): New function.
293
8204c077 2942015-10-21 Martin Sebor <msebor@redhat.com>
295
296 PR driver/68043
297 * c.opt: End each sentence that describes an option with a period.
298
8523243e 2992015-10-20 Marek Polacek <polacek@redhat.com>
300
301 * array-notation-common.c (is_cilkplus_vector_p): Define.
302 * c-common.h (is_cilkplus_vector_p): Declare.
303
08881cb8 3042015-10-20 Marek Polacek <polacek@redhat.com>
305
306 * c.opt (std=gnu++11): Do not describe as experimental.
307 (std=gnu++14): Likewise.
308
a36e5e5e 3092015-10-19 Jason Merrill <jason@redhat.com>
310
311 * c-cppbuiltin.c (c_cpp_builtins): Define
312 __cpp_nontype_template_args.
313
a349de0a 3142015-10-19 Jason Merrill <jason@redhat.com>
315
316 * c-cppbuiltin.c (c_cpp_builtins): Define
317 __cpp_enumerator_attributes, __cpp_fold_expressions,
318 __cpp_unicode_characters.
319
43895be5 3202015-10-13 Jakub Jelinek <jakub@redhat.com>
321 Aldy Hernandez <aldyh@redhat.com>
322
323 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
324 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
325 (c_define_builtins): Likewise.
326 * c-common.h (enum c_omp_clause_split): Add
327 C_OMP_CLAUSE_SPLIT_TASKLOOP.
328 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
329 (c_finish_omp_for): Add ORIG_DECLV argument.
330 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
331 201511 instead of 201307.
332 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
333 OMP_CRITICAL_CLAUSES to it.
334 (c_finish_omp_ordered): Add CLAUSES argument, set
335 OMP_ORDERED_CLAUSES to it.
336 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
337 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
338 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
339 constructs and new OpenMP 4.5 clauses. Clear
340 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
341 verification code.
342 * c-pragma.c (omp_pragmas_simd): Add taskloop.
343 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
344 (enum pragma_omp_clause): Add
345 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
346 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
347
20cb53c9 3482015-10-05 Richard Sandiford <richard.sandiford@arm.com>
349
350 * c-lex.c (interpret_float): Use real_equal instead of
351 REAL_VALUES_EQUAL.
352
6d02e6b2 3532015-10-04 Jason Merrill <jason@redhat.com>
354
355 Implement N4514, C++ Extensions for Transactional Memory.
356 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
357 (c_common_attribute_table): Add transaction_safe_dynamic.
358 transaction_safe now affects type identity.
359 (handle_tm_attribute): Handle transaction_safe_dynamic.
360 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
361 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
362 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
363 (D_TRANSMEM): New.
364 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
365 * c-pretty-print.c (pp_c_attributes_display): Don't print
366 transaction_safe in C++.
367
c0999a5d 3682015-10-02 Marek Polacek <polacek@redhat.com>
369
370 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
371
ef17a71a 3722015-10-02 Marek Polacek <polacek@redhat.com>
373
374 PR c/64249
375 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
376 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
377 * c.opt (Wduplicated-cond): New option.
378
05b84e7b 3792015-10-01 Joseph Myers <joseph@codesourcery.com>
380
381 * c.opt (std=c11): Do not describe as experimental.
382 (std=gnu11): Likewise.
383 (std=iso9899:2011): Likewise.
384
e561d5e1 3852015-09-28 Nathan Sidwell <nathan@codesourcery.com>
386
387 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
388 (DEF_FUNCTION_TYPE_VAR_11): Delete.
389
bd4b90d2 3902015-09-25 Marek Polacek <polacek@redhat.com>
391
392 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
393 (ubsan_instrument_shift): Likewise.
394
ac13b2b2 3952015-09-25 Marek Polacek <polacek@redhat.com>
396
397 PR sanitizer/64906
398 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
399
a3c82f4c 4002015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
401
402 * c-indentation.c (should_warn_for_misleading_indentation):
403 Compare next_stmt_vis_column with guard_line_first_nws instead
404 of with guard_line_vis_column.
405
5eef101d 4062015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
407
408 PR c/49654
409 PR c/49655
410 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
411 options and options not valid for the current language.
412
60897493 4132015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
414
415 * c-indentation.c (should_warn_for_misleading_indentation):
416 Float out and consolidate the calls to get_visual_column that
417 are passed guard_exploc as an argument. Compare
418 next_stmt_vis_column with guard_line_first_nws instead of with
419 body_line_first_nws.
420
85c93154 4212015-09-22 Nathan Sidwell <nathan@codesourcery.com>
422
423 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
424 Wnamespaces): New C++ warnings.
425
229a58b1 4262015-09-22 Jason Merrill <jason@redhat.com>
427
428 * c-common.h (abi_compat_version_crosses): New.
429 (warn_abi_version): Declare.
430 * c-common.c: Define it.
431 * c-opts.c (c_common_post_options): Handle it.
432 flag_abi_compat_version defaults to 8.
433
2d2de569 4342015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
435
436 Complete the implementation of N4230, Nested namespace definition.
437 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
438 __cpp_nested_namespace_definitions.
439
2b897e68 4402015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
441
442 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
443
ed536208 4442015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
445
446 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
447 when warning.
448 * c-pragma.h (pragma_lex): Add optional loc argument.
449
1dc6c44d 4502015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
451
452 * c-format.c (check_format_arg): Adjust to use common block size in all
453 object pools.
454
be812248 4552015-09-15 David Malcolm <dmalcolm@redhat.com>
456
457 * c-format.c (location_from_offset): Update for change in
458 signature of location_get_source_line.
459 * c-indentation.c (get_visual_column): Likewise.
460 (line_contains_hash_if): Likewise.
461
e4cc057f 4622015-09-14 Marek Polacek <polacek@redhat.com>
463
464 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
465 setting various warnings.
466
85f5e2ee 4672015-09-14 Marek Polacek <polacek@redhat.com>
468
469 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
470 a negative value.
471
1bca8cbd 4722015-09-11 Mark Wielaard <mjw@redhat.com>
473
474 PR c/28901
475 * c.opt (Wunused-variable): Option from common.opt.
476 (Wunused-const-variable): New option.
477
ee48893a 4782015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
479
480 PR c++/53184
481 * c.opt ([Wsubobject-linkage]): Add.
482
547c6b1f 4832015-09-03 Martin Sebor <msebor@redhat.com>
484
485 PR c/66516
486 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
487 functions.
488 * c-common.c (reject_gcc_builtin): Define.
489
7e976b10 4902015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
491
492 PR middle-end/60586
493 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
494 prototype.
495 * c-gimplify.c (c_gimplify_expr): Added a call to the function
496 cilk_gimplify_call_params_in_spawned_fn.
497 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
498 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
499 unwrapping.
500
9e6bcade 5012015-08-25 Marek Polacek <polacek@redhat.com>
502
503 PR middle-end/67330
504 * c-common.c (handle_weak_attribute): Don't check whether the
505 visibility can be changed here.
506
af9de21d 5072015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
508
509 * c-lex.c (c_lex_with_flags): Use explicit locations.
510
6dc50383 5112015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
512
513 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
514 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
515
10902624 5162015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
517
518 PR middle-end/36757
519 * c-common.c (check_builtin_function_arguments): Add check
520 for BUILT_IN_SIGNBIT argument.
521
a03a71ab 5222015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
523
524 PR c++/67160
525 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
526 in c++1z mode.
527
22723c26 5282015-08-17 Marek Polacek <polacek@redhat.com>
529
530 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
531 with whitespaces before qualifier names.
532
f4809955 5332015-08-12 Marek Polacek <polacek@redhat.com>
534
535 PR c++/55095
536 * c-common.c (maybe_warn_shift_overflow): Properly handle
537 left-shifting 1 into the sign bit.
538
5463f502 5392015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
540
541 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
542
56c12fd4 5432015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
544 Braden Obrzut <admin@maniacsvault.net>
545 Jason Merrill <jason@redhat.com>
546
547 Add C++ Concepts TS support.
548 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
549 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
550 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
551 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
552 * c-opts.c (set_std_cxx1z): Set flag_concepts.
553 * c.opt (fconcepts): New.
554
17afcef6 5552015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
556
557 * c-indentation.c (should_warn_for_misleading_indentation):
558 Improve heuristics.
559
f95bfdd4 5602015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
561
562 * c-indentation.c (get_visual_column): Add parameter first_nws,
563 use it. Update comment documenting the function.
564 (is_first_nonwhitespace_on_line): Remove.
565 (should_warn_for_misleading_indentation): Replace usage of
566 of is_first_nonwhitespace_on_line with get_visual_column.
567
9255be07 5682015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
569
570 * c-indentation.h (struct token_indent_info): Define.
571 (get_token_indent_info): Define.
572 (warn_for_misleading_information): Declare.
573 * c-common.h (warn_for_misleading_information): Remove.
574 * c-identation.c (warn_for_misleading_indentation):
575 Change declaration to take three token_indent_infos. Adjust
576 accordingly.
577 * c-identation.c (should_warn_for_misleading_indentation):
578 Likewise. Bail out early if the body is a compound statement.
579 (guard_tinfo_to_string): Define.
580
e880695c 5812015-07-30 Jason Merrill <jason@redhat.com>
582
583 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
584 '*' for reference decay.
585
f58dd84b 5862015-07-30 Marek Polacek <polacek@redhat.com>
587
588 * c-common.c (warn_tautological_cmp): Bail for float types.
589
d9e4fe27 5902015-07-27 Marek Polacek <polacek@redhat.com>
591
592 PR bootstrap/67030
593 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
594
6784a472 5952015-07-27 Marek Polacek <polacek@redhat.com>
596
597 PR c++/66555
598 PR c/54979
599 * c-common.c (find_array_ref_with_const_idx_r): New function.
600 (warn_tautological_cmp): New function.
601 * c-common.h (warn_tautological_cmp): Declare.
602 * c.opt (Wtautological-compare): New option.
603
08034975 6042015-07-23 Marek Polacek <polacek@redhat.com>
605
606 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
607 (ubsan_instrument_shift): Likewise.
608
f6f5e49b 6092015-07-23 Marek Polacek <polacek@redhat.com>
610
611 PR sanitizer/66908
612 * c-ubsan.c: Include gimplify.h.
613 (ubsan_instrument_division): Unshare OP0 and OP1.
614 (ubsan_instrument_shift): Likewise.
615
8d669e79 6162015-07-20 Marek Polacek <polacek@redhat.com>
617 Richard Sandiford <richard.sandiford@arm.com>
618
619 PR c++/55095
620 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
621 Use EXPR_LOC_OR_LOC.
622 (maybe_warn_shift_overflow): New function.
623 * c-common.h (maybe_warn_shift_overflow): Declare.
624 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
625 * c.opt (Wshift-overflow): New option.
626
e16712b1 6272015-07-16 Martin Liska <mliska@suse.cz>
628
629 * c-format.c (static void check_format_info_main): Use
630 object_allocator instead of pool_allocator.
631 (check_format_arg): Likewise.
632 (check_format_info_main): Likewise.
633
e51764ad 6342015-07-15 Andrew MacLeod <amacleod@redhat.com>
635
636 * c-opts.c: Remove multiline #include comment.
637
47ae02b7 6382015-07-12 Aldy Hernandez <aldyh@redhat.com>
639
640 * c-common.c: Fix double word typos.
641
ed2b2eb2 6422015-07-10 Eric Botcazou <ebotcazou@adacore.com>
643
644 * c-ada-spec.h (cpp_operation): Revert latest change.
645 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
646 constructors and destructors.
647
1eacc14a 6482015-07-09 Andrew MacLeod <amacleod@redhat.com>
649
650 * c-common.h: Adjust includes for flags.h changes.
651 * stub-objc.c: Likewise.
47ae02b7 652
0124237f 6532015-07-08 Eric Botcazou <ebotcazou@adacore.com>
654
655 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
656 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
657
386ef929 6582015-07-08 Jakub Jelinek <jakub@redhat.com>
659
660 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
661 are to be removed, return NULL rather than original clauses list.
662
9ef16211 6632015-07-07 Andrew MacLeod <amacleod@redhat.com>
664
665 * array-notation-common.c: Adjust includes.
666 * c-ada-spec.c: Likewise.
667 * c-cilkplus.c: Likewise.
668 * c-common.h: Likewise.
669 * c-cppbuiltin.c: Likewise.
670 * c-dump.c: Likewise.
671 * c-format.c: Likewise.
672 * c-gimplify.c: Likewise.
673 * c-indentation.c: Likewise.
674 * c-lex.c: Likewise.
675 * c-omp.c: Likewise.
676 * c-opts.c: Likewise.
677 * c-pch.c: Likewise.
678 * c-ppoutput.c: Likewise.
679 * c-pragma.c: Likewise.
680 * c-pretty-print.c: Likewise.
681 * c-semantics.c: Likewise.
682 * c-ubsan.c: Likewise.
683 * cilk.c: Likewise.
684 * stub-objc.c: Likewise.
685
67ede3e4 6862015-07-07 Eric Botcazou <ebotcazou@adacore.com>
687
688 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
689 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
690
42af8c2a 6912015-07-01 Jason Merrill <jason@redhat.com>
692
fa769cc5 693 * c-common.h (D_CXX11): Rename from D_CXX0X.
694 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
695 * c-common.c: Adjust.
696
97e9c847 697 * c-opts.c (c_common_post_options): Default to C++14.
698
42af8c2a 699 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
700
30b1ba42 7012015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
702
703 Implement N4197 - Adding u8 character literals
95858835 704 * c-family/c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
705 CPP_CHAR.
706 * c-family/c-common.c (c_parse_error): Print CPP_UTF8CHAR and
707 CPP_UTF8CHAR_USERDEF tokens.
708 * c-family/c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
709 and CPP_UTF8CHAR tokens.
710 (lex_charconst): Treat CPP_UTF8CHAR token.
30b1ba42 711
0949f227 7122015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
713
714 PR fortran/66605
715 * c-common.c (do_warn_unused_parameter): Move here.
716 * c-common.h (do_warn_unused_parameter): Declare.
717
be23b16f 7182015-06-29 Marek Polacek <polacek@redhat.com>
719
720 PR c/66322
721 * c-common.c (check_case_bounds): Add bool * parameter. Set
722 OUTSIDE_RANGE_P.
723 (c_add_case_label): Add bool * parameter. Pass it down to
724 check_case_bounds.
725 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
726 warning here.
727 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
728 declarations.
729
6290f0db 7302015-06-27 Marek Polacek <polacek@redhat.com>
731
732 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
733 or VECTOR_INTEGER_TYPE_P throughout.
734 * c-gimplify.c: Likewise.
735
aa3e402e 7362015-06-26 Marek Polacek <polacek@redhat.com>
737
738 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
739 * c-common.c (c_fully_fold_internal): Likewise.
740 (c_alignof_expr): Likewise.
741 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
742 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
8204c077 743 * cilk.c (create_parm_list): Likewise.
aa3e402e 744
4e81b384 7452015-06-26 Marek Polacek <polacek@redhat.com>
746
747 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
748
ec2e0095 7492015-06-25 Andrew MacLeod <amacleod@redhat.com>
750
751 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
752 * c-gimplify.c: Likewise.
753 * c-pragma.c: Likewise.
754 * c-ubsan.c: Likewise.
755 * cilk.c: Likewise.
756
b594087e 7572015-06-25 Richard Sandiford <richard.sandiford@arm.com>
758
759 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
760 ggc_hasher.
761
a3c76fda 7622015-06-25 Andrew MacLeod <amacleod@redhat.com>
763
764 * cilk.c: Move calls.h after tm.h in the include chain.
765
f48c7f4a 7662015-06-25 Marek Polacek <polacek@redhat.com>
767
768 * array-notation-common.c: Use VAR_P throughout.
769 * c-ada-spec.c: Likewise.
770 * c-common.c: Likewise.
771 * c-format.c: Likewise.
772 * c-gimplify.c: Likewise.
773 * c-omp.c: Likewise.
774 * c-pragma.c: Likewise.
775 * c-pretty-print.c: Likewise.
776 * cilk.c: Likewise.
777
ce41e81a 7782015-06-25 Marek Polacek <polacek@redhat.com>
779
780 * cilk.c (extract_free_variables): Use is_global_var.
781
de231ec2 7822015-06-23 Richard Sandiford <richard.sandiford@arm.com>
783
784 * c-common.c: Don't include target-def.h.
785
0200602e 7862015-06-23 Marek Polacek <polacek@redhat.com>
787
788 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
789 when comparing INTEGER_CSTs.
790
99838ed7 7912015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
792
793 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
794 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
795 (dump_ada_template): Skip partially specialized types.
796
a4f59596 7972015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
798
799 * c-common.c (scalar_to_vector): Use std::swap instead of manually
800 swapping.
801
f2ab3bac 8022015-06-17 Andrew MacLeod <amacleod@redhat.com>
803
804 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
805 * c-ada-spec.c: Likewise.
806 * c-cilkplus.c: Likewise.
807 * c-common.c: Likewise.
808 * c-common.h: Likewise.
809 * c-cppbuiltin.c: Likewise.
810 * c-dump.c: Likewise.
811 * c-format.c: Likewise.
812 * c-gimplify.c: Likewise.
813 * c-indentation.c: Likewise.
814 * c-lex.c: Likewise.
815 * c-omp.c: Likewise.
816 * c-opts.c: Likewise.
817 * c-pch.c: Likewise.
818 * c-ppoutput.c: Likewise.
819 * c-pragma.c: Likewise.
820 * c-pretty-print.c: Likewise.
821 * c-semantics.c: Likewise.
822 * c-ubsan.c: Likewise.
823 * cilk.c: Likewise.
824 * stub-objc.c: Likewise.
825
db3d1ffc 8262015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
827
828 PR c++/65168
829 * c-common.c (c_common_truthvalue_conversion): Warn when
830 converting an address of a reference to a truth value.
831
64486212 8322015-06-08 Andrew MacLeod <amacleod@redhat.com>
833
834 * array-notation-common.c : Adjust include files.
835 * c-ada-spec.c : Likewise.
836 * c-cilkplus.c : Likewise.
837 * c-common.c : Likewise.
838 * c-common.h : Likewise.
839 * c-cppbuiltin.c : Likewise.
840 * c-dump.c : Likewise.
841 * c-format.c : Likewise.
842 * c-gimplify.c : Likewise.
843 * c-indentation.c : Likewise.
844 * c-lex.c : Likewise.
845 * c-omp.c : Likewise.
846 * c-opts.c : Likewise.
847 * c-pch.c : Likewise.
848 * c-ppoutput.c : Likewise.
849 * c-pragma.c : Likewise.
850 * c-pretty-print.c : Likewise.
851 * c-semantics.c : Likewise.
852 * c-ubsan.c : Likewise.
853 * cilk.c : Likewise.
854 * stub-objc.c : Likewise.
855
6e84ccad 8562015-06-08 Marek Polacek <polacek@redhat.com>
857
858 PR c/66415
859 * c-format.c (location_from_offset): Return LOC if LINE is null.
860
3a1c9df2 8612015-06-05 Aldy Hernandez <aldyh@redhat.com>
862
863 * c-common.h (c_parse_final_cleanups): New prototype.
864 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
865
f77c0292 8662015-06-04 Andrew MacLeod <amacleod@redhat.com>
867
868 * array-notation-common.c: Adjust includes for restructured coretypes.h.
869 * c-ada-spec.c: Likewise.
870 * c-cilkplus.c: Likewise.
871 * c-common.c: Likewise.
872 * c-common.h: Likewise.
873 * c-cppbuiltin.c: Likewise.
874 * c-dump.c: Likewise.
875 * c-format.c: Likewise.
876 * c-gimplify.c: Likewise.
877 * c-indentation.c: Likewise.
878 * c-lex.c: Likewise.
879 * c-omp.c: Likewise.
880 * c-opts.c: Likewise.
881 * c-pch.c: Likewise.
882 * c-ppoutput.c: Likewise.
883 * c-pragma.c: Likewise.
884 * c-pretty-print.c: Likewise.
885 * c-semantics.c: Likewise.
886 * c-ubsan.c: Likewise.
887 * cilk.c: Likewise.
888 * stub-objc.c: Likewise.
889
7c62dfbb 8902015-06-02 David Malcolm <dmalcolm@redhat.com>
891
892 PR c/66220:
893 * c-indentation.c (should_warn_for_misleading_indentation): Use
894 expand_location rather than expand_location_to_spelling_point.
895 Don't warn if the guarding statement is more indented than the
896 next/body stmts.
897
9af7c176 8982015-06-02 David Malcolm <dmalcolm@redhat.com>
899
900 * c-indentation.c (warn_for_misleading_indentation): Bail out
901 immediately if -Wmisleading-indentation isn't enabled.
902
eebcf436 9032015-06-01 Martin Liska <mliska@suse.cz>
904
905 * c-format.c (check_format_arg):Use new type-based pool allocator.
906 (check_format_info_main) Likewise.
907
b0a23e2f 9082015-05-31 Eric Botcazou <ebotcazou@adacore.com>
909
910 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
911 (has_nontrivial_methods): Likewise.
912
63dc1330 9132015-05-25 Marek Polacek <polacek@redhat.com>
914
915 * c-ubsan.c (ubsan_instrument_shift): Use type0.
916
5a4c69dd 9172015-05-22 Marek Polacek <polacek@redhat.com>
918
919 PR c/47043
920 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
921
044580bb 9222015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3764c94e 923
924 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
925 STACK_GROWS_DOWNWARD.
926
044580bb 9272015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2b785411 928
929 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
930 STACK_GROWS_DOWNWARD rather than if it is defined.
931
d5a2ddc7 9322015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8204c077 933
d5a2ddc7 934 PR c/52952
935 * c-format.c (location_column_from_byte_offset): New.
936 (location_from_offset): New.
937 (struct format_wanted_type): Add offset_loc field.
938 (check_format_info): Move handling of location for extra arguments
939 closer to the point of warning.
940 (check_format_info_main): Pass the result of location_from_offset
941 to warning_at.
942 (format_type_warning): Pass the result of location_from_offset
943 to warning_at.
944
72f8014e 9452015-05-20 Marek Polacek <polacek@redhat.com>
946
947 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
948
74efe522 9492015-05-20 Marek Polacek <polacek@redhat.com>
950
951 * c-ada-spec.c (dump_sloc): Use DECL_P.
952
b443c459 9532015-05-20 Marek Polacek <polacek@redhat.com>
954
955 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
956 * c-common.c: Likewise.
957
551e34da 9582015-05-19 David Malcolm <dmalcolm@redhat.com>
959
960 * c-common.h (fe_file_change): Strengthen param from
961 const line_map * to const line_map_ordinary *.
962 (pp_file_change): Likewise.
963 * c-lex.c (fe_file_change): Likewise.
964 (cb_define): Use linemap_check_ordinary when invoking
965 SOURCE_LINE.
966 (cb_undef): Likewise.
967 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
968 invoking cb_file_change.
969 (c_finish_options): Likewise.
970 (push_command_line_include): Likewise.
971 (cb_file_change): Strengthen param "new_map" from
972 const line_map * to const line_map_ordinary *.
973 * c-ppoutput.c (cb_define): Likewise for local "map".
974 (pp_file_change): Likewise for param "map" and local "from".
975
dfcf26a5 9762015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
977
978 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
979
2e474820 9802015-05-18 Tom de Vries <tom@codesourcery.com>
981
982 * c-common.c (build_va_arg_1): New function.
983 (build_va_arg): Add address operator to va_list operand if necessary.
984
e53013a8 9852015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
986
987 PR c/48956
988 * c-common.c (int_safely_convertible_to_real_p): Define.
989 (unsafe_conversion_p): Check conversions involving complex types.
990 (conversion_warning): Add new warning message for conversions which
991 discard imaginary component.
992 * c-common.h: (enum conversion_safety): Add new enumerator for such
993 conversions.
994
aac24642 9952015-05-14 Marek Polacek <polacek@redhat.com>
996
997 PR c/66066
998 PR c/66127
999 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
1000 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
1001 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
1002 use it. If FOR_INT_CONST, require that all evaluated operands be
1003 INTEGER_CSTs.
1004
e5f01cba 10052015-05-12 David Malcolm <dmalcolm@redhat.com>
1006
1007 * c-common.h (warn_for_misleading_indentation): New prototype.
1008 * c-indentation.c: New file.
1009 * c.opt (Wmisleading-indentation): New option.
1010
c37be9ec 10112015-05-12 Tom de Vries <tom@codesourcery.com>
1012
1013 PR tree-optimization/66010
1014 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
1015
7290114b 10162015-05-09 Jason Merrill <jason@redhat.com>
1017
3c665566 1018 * c-opts.c (c_common_post_options): Also clear
1019 cpp_opts->cpp_warn_cxx11_compat.
1020
d875b9d2 1021 * c-common.h (enum cxx_dialect): Add cxx_unset.
1022 * c-common.c (cxx_dialect): Initialize to cxx_unset.
1023 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
1024
7290114b 1025 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
1026 (std=gnu++0x): Mark as Undocumented.
1027 (std=gnu++1y): Add deprecated message.
1028
1b03cc89 10292015-05-08 Jason Merrill <jason@redhat.com>
1030
1c5f7aba 1031 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
1032 * c-opts.c: Adjust.
1033
1b03cc89 1034 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
1035
dc5945dc 10362015-05-08 Marek Polacek <polacek@redhat.com>
1037
1038 PR c/64918
1039 * c.opt (Woverride-init-side-effects): New option.
1040
cdc64059 10412015-05-07 Marek Polacek <polacek@redhat.com>
1042
1043 PR c/65179
1044 * c-common.c (c_fully_fold_internal): Warn when left shifting a
1045 negative value.
1046 * c.opt (Wshift-negative-value): New option.
1047 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
1048 when -Wextra and C99/C++11 mode.
1049
8cafe283 10502015-05-07 Marek Polacek <polacek@redhat.com>
1051 Martin Uecker <uecker@eecs.berkeley.edu>
1052
1053 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
1054 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
1055
cb40a6f7 10562015-05-05 Jason Merrill <jason@redhat.com>
1057
1058 * c.opt (Wterminate): New.
1059
14744a16 10602015-04-30 Marek Polacek <polacek@redhat.com>
1061
1062 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
1063 require that the non-constant be of a boolean type.
1064
9866562d 10652015-04-29 Josh Triplett <josh@joshtriplett.org>
1066
8cafe283 1067 * c-common.c (handle_section_attribute): Refactor to reduce
1068 nesting and distinguish between error cases.
9866562d 1069
a720ab1c 10702015-04-29 Marek Polacek <polacek@redhat.com>
1071
1072 PR c/64610
1073 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
1074 with 0/1.
1075
8c072e52 10762015-04-29 Jakub Jelinek <jakub@redhat.com>
1077
1078 * c-common.h (omp_clause_mask): Unconditionally define as a class.
1079 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
1080 HOST_BITS_PER_WIDE_INT.
1081
f7fec1c7 10822015-04-28 Tom de Vries <tom@codesourcery.com>
1083
1084 PR tree-optimization/65887
1085 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
1086
483b3d26 10872015-04-28 Eric Botcazou <ebotcazou@adacore.com>
8cafe283 1088 Pierre-Marie de Rodat <derodat@adacore.com>
483b3d26 1089
1090 * c-ada-spec.c (in_function): Delete.
1091 (dump_generic_ada_node): Do not change in_function and remove the
1092 redundant code dealing with it.
1093 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
1094 (print_ada_methods): Output the static member functions in a nested
1095 package after the regular methods as well as associated renamings.
1096
f11bdffb 10972015-04-24 Marek Polacek <polacek@redhat.com>
1098
1099 PR c/65830
1100 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
1101 and OPT_Wshift_count_overflow.
1102
485f6b9c 1103 PR c/63357
1104 * c-common.c (warn_logical_operator): Warn if the operands have the
1105 same expressions.
1106
439606a9 11072015-04-24 Marek Polacek <polacek@redhat.com>
1108
1109 PR c/61534
1110 * c-common.c (warn_logical_operator): Bail if either operand comes
1111 from a macro expansion.
1112
de801c28 11132015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1114
1115 PR target/55143
1116 * c-common.c (c_default_pointer_mode): Add definition.
1117 * c-common.h (c_default_pointer_mode): Add declaration.
1118
76738f56 11192015-03-11 Jakub Jelinek <jakub@redhat.com>
1120
1121 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
1122 on record_builtin_type argument.
1123
16f958b3 11242015-03-10 Jakub Jelinek <jakub@redhat.com>
1125
1126 PR c/65120
1127 * c-common.c (warn_logical_not_parentheses): Don't warn for
1128 !x == 0 or !x != 0.
1129
9b22f73f 11302015-03-07 Marek Polacek <polacek@redhat.com>
1131
1132 PR sanitizer/65280
1133 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
1134 before trying to figure out whether we have a flexible array member.
1135
a864b7d4 11362015-03-06 Eric Botcazou <ebotcazou@adacore.com>
1137 Jonathan Wakely <jwakely.gcc@gmail.com>
1138
1139 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
1140
9bf8c90b 11412015-03-05 Eric Botcazou <ebotcazou@adacore.com>
1142
1143 PR ada/65319
1144 * c-ada-spec.c (print_destructor): Remove obsolete code.
1145
037ac54f 11462015-03-01 Eric Botcazou <ebotcazou@adacore.com>
1147
1148 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
1149 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
1150 DECL_TEMPLATE_RESULT emulations.
1151 (dump_ada_template)): Add guard for TYPE_METHODS.
1152
495cbfb8 11532015-02-27 Marek Polacek <polacek@redhat.com>
1154
1155 PR c/65040
1156 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
1157
688a864e 11582015-02-27 Kai Tietz <ktietz@redhat.com>
1159
1160 PR c/35330
1161 * c-pragma.c (handle_pragma_weak): Do not try to create
1162 weak/alias of declarations not being function, or variable
1163 declarations.
1164
6349b8cc 11652015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1166
1167 PR libgomp/64625
1168 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1169 Remove macros.
1170 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1171
3afd5369 11722015-02-16 Marek Polacek <polacek@redhat.com>
1173
1174 PR c/65066
1175 * c-format.c (check_format_types): Handle null param.
1176
46173d1b 11772015-02-13 Marek Polacek <polacek@redhat.com>
1178
1179 PR c/65040
1180 * c-format.c (check_format_types): Don't warn about different
1181 signedness if the original value is in the range of WANTED_TYPE.
1182
1d524ff7 11832015-02-12 Jason Merrill <jason@redhat.com>
1184
1185 PR c++/64956
1186 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
1187 to the current highest version.
1188 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
1189
bbf8fbec 11902015-02-04 Jakub Jelinek <jakub@redhat.com>
1191
1192 PR c/64824
1193 PR c/64868
1194 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
1195 instead of RDIV_EXPR. Use build_binary_op instead of
1196 build2_loc.
1197
c05be867 11982015-01-30 Joseph Myers <joseph@codesourcery.com>
1199
1200 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
1201 to pass input_location as first argument.
1202
85977647 12032015-01-23 Tom de Vries <tom@codesourcery.com>
1204
1205 PR libgomp/64672
1206 * c.opt (fopenacc): Mark as LTO option.
1207
fa175926 12082015-01-23 Tom de Vries <tom@codesourcery.com>
1209
1210 PR libgomp/64707
1211 * c.opt (fopenmp): Mark as LTO option.
1212
20aad5ba 12132015-01-21 Jakub Jelinek <jakub@redhat.com>
1214
1215 PR c/63307
8204c077 1216 * cilk.c (fill_decls_vec): Only put decls into vector v.
20aad5ba 1217 (compare_decls): Fix up formatting.
1218
12192015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
1220
1221 PR c/63307
1222 * cilk.c: Include vec.h.
1223 (struct cilk_decls): New structure.
1224 (wrapper_parm_cb): Split this function to...
1225 (fill_decls_vec): ...this...
1226 (create_parm_list): ...and this.
1227 (compare_decls): New function.
1228 (for_local_cb): Remove.
1229 (wrapper_local_cb): Ditto.
1230 (build_wrapper_type): For now first traverse and fill vector of
1231 declarations then sort it and then deal with sorted vector.
1232 (cilk_outline): Ditto.
1233 (declare_one_free_variable): Ditto.
1234
60b77e28 12352015-01-21 Jason Merrill <jason@redhat.com>
1236
1237 PR c++/64629
1238 * c-format.c (check_format_arg): Call decl_constant_value.
1239
85fbea97 12402015-01-19 Martin Liska <mliska@suse.cz>
1241
1242 * c-common.c (handle_noicf_attribute): New function.
1243
ca4c3545 12442015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1245 Bernd Schmidt <bernds@codesourcery.com>
1246 James Norris <jnorris@codesourcery.com>
1247 Cesar Philippidis <cesar@codesourcery.com>
1248 Ilmir Usmanov <i.usmanov@samsung.com>
1249 Jakub Jelinek <jakub@redhat.com>
1250
1251 * c.opt (fopenacc): New option.
1252 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
1253 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1254 New macros.
1255 * c-common.h (c_finish_oacc_wait): New prototype.
1256 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
1257 (c_finish_oacc_wait): New function.
1258 * c-pragma.c (oacc_pragmas): New variable.
1259 (c_pp_lookup_pragma, init_pragma): Handle it.
1260 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
1261 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
1262 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
1263 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1264 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
1265 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
1266 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
1267 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
1268 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
1269 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
1270 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
1271 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
1272 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
1273 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
1274 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
1275 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
1276 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
1277 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
1278 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
1279 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
1280 PRAGMA_OACC_CLAUSE_WORKER.
1281
947aa916 12822015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
1283
1284 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
1285 for the new option fstack-protector_explicit.
1286 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
1287 (handle_stack_protect_attribute): New function.
1288
e4fd7af1 12892015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
1290
1291 * c.opt: New option -Warray-bounds=.
1292
1f78217c 12932015-01-09 Michael Collison <michael.collison@linaro.org>
1294
1295 * array-notation-common.c: Include hash-set.h, machmode.h,
1296 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1297 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1298 * c-ada-spec.c: Ditto.
1299 * c-cilkplus.c: Ditto.
1300 * c-common.c: Include input.h due to flattening of tree.h.
1301 Define macro GCC_C_COMMON_C.
1302 * c-common.h: Flatten tree.h header files into c-common.h.
1303 Remove include of tree-core.h.
1304 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
1305 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1306 fold-const.h, wide-int.h, and inchash.h due to
1307 flattening of tree.h.
1308 * c-dump.c: Ditto.
1309 * c-format.c: Flatten tree.h header files into c-common.h.
1310 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
1311 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1312 fold-const.h, wide-int.h, and inchash.h due to
1313 flattening of tree.h.
1314 * c-dump.c: Include hash-set.h, machmode.h,
1315 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1316 fold-const.h, wide-int.h, and inchash.h due to
1317 flattening of tree.h.
1318 * c-format.c: Include hash-set.h, machmode.h,
1319 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1320 fold-const.h, wide-int.h, inchash.h and real.h due to
1321 flattening of tree.h.
1322 * c-gimplify.c: Include hash-set.h, machmode.h,
1323 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1324 fold-const.h, wide-int.h, and inchash.h due to
1325 flattening of tree.h.
1326 * cilk.c: Ditto.
1327 * c-lex.c: Ditto.
1328 * c-omp.c: Ditto.
1329 * c-opts.c: Ditto.
1330 * c-pch.c: Ditto.
1331 * c-ppoutput.c: Ditto.
1332 * c-pragma.c: Ditto.
1333 * c-pretty-print.c: Ditto.
1334 * c-semantics.c: Ditto.
1335 * c-ubsan.c: Ditto.
1336 * stub-objc.c: Ditto.
1337
411b7663 13382015-01-08 Jason Merrill <jason@redhat.com>
1339
1340 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
1341 do_ubsan_in_current_function.
1342 (ubsan_maybe_instrument_reference_or_call): Likewise.
1343 * c-ubsan.h: Declare it.
1344
d1e96383 13452015-01-08 Mike Stump <mikestump@comcast.net>
1346
1347 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
1348
b57910fa 13492015-01-07 Marek Polacek <polacek@redhat.com>
1350
1351 PR c/64440
1352 * c-common.c (c_fully_fold_internal): Warn for division and modulo
1353 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
1354
678a4e3e 13552015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1356
1357 PR c++/31397
1358 * c.opt (Wsuggest-override): New option.
1359
d353bf18 13602015-01-05 Jakub Jelinek <jakub@redhat.com>
1361
1362 Update copyright years.
1363
92b63884 13642015-01-05 Marek Polacek <polacek@redhat.com>
1365
1366 PR c/64423
1367 * c-common.c (warn_array_subscript_with_type_char): Add location_t
1368 parameter. Use it.
1369 * c-common.h (warn_array_subscript_with_type_char): Update
1370 declaration.
1371
83715bc4 13722014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
1373
1374 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
1375 Control macro with flag_sized_deallocation.
1376
8a8211df 13772014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1378
1379 * c.opt (Wdiscarded-array-qualifiers): New option.
1380
33058239 13812014-12-19 Jakub Jelinek <jakub@redhat.com>
1382
1383 PR preprocessor/63831
1384 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
1385 and __has_cpp_attribute here.
1386 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
1387 c_common_has_attribute.
1388 * c-common.h (c_common_has_attribute): New prototype.
1389 * c-lex.c (init_c_lex): Set cb->has_attribute to
1390 c_common_has_attribute instead of cb_has_attribute.
1391 (get_token_no_padding): New function.
1392 (cb_has_attribute): Renamed to ...
1393 (c_common_has_attribute): ... this. No longer static. Use
1394 get_token_no_padding, require ()s, don't build TREE_LIST
1395 unnecessarily, fix up formatting, adjust diagnostics, call
1396 init_attributes.
1397
d1856d2c 13982014-12-15 Jason Merrill <jason@redhat.com>
1399
1400 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
1401 (-Wsized-deallocation): New.
1402 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
1403 to on in C++14 and up.
1404
4972ed5d 14052014-12-11 Jason Merrill <jason@redhat.com>
1406
7d7fa964 1407 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
1408
4972ed5d 1409 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
1410 we aren't complaining about VLAs.
1411
5ebccf71 14122014-12-06 Marek Polacek <polacek@redhat.com>
1413
1414 PR tree-optimization/64183
1415 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
1416 shift-expression if it is integer_type_node. Use types_compatible_p.
1417
f9e245b2 14182014-11-29 Jakub Jelinek <jakub@redhat.com>
1419
1420 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
1421 last argument from create_tmp_var_raw and create_tmp_var calls.
1422 * cilk.c (gimplify_cilk_spawn): Likewise.
1423 * c-omp.c (c_finish_omp_atomic): Likewise.
1424
d2f60593 14252014-11-28 Marek Polacek <polacek@redhat.com>
1426
1427 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
1428 instead of unsigned_type_node.
1429
fce2dbd1 14302014-11-28 Marek Polacek <polacek@redhat.com>
1431
1432 PR c/63862
1433 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
1434 to op1_utype.
1435 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
1436 expression to unsigned_type_node.
1437
3a4a2292 14382014-11-20 Mark Wielaard <mjw@redhat.com>
1439
1440 PR debug/38757
1441 * c-opts.c (set_std_c89): Set lang_hooks.name.
1442 (set_std_c99): Likewise.
1443 (set_std_c11): Likewise.
1444 (set_std_cxx98): Likewise.
1445 (set_std_cxx11): Likewise.
1446 (set_std_cxx14): Likewise.
1447 (set_std_cxx1z): Likewise.
1448
c61ef207 14492014-11-21 Jakub Jelinek <jakub@redhat.com>
1450
1451 PR target/63764
1452 * c-common.h (convert_vector_to_pointer_for_subscript): Change
1453 return type to bool.
c9ed79de 1454 * c-common.c: Include gimple-expr.h.
c61ef207 1455 (convert_vector_to_pointer_for_subscript): Change return type to
1456 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
1457 and copy it into a TARGET_EXPR and use that instead of *vecp
1458 directly.
1459
1a91d914 14602014-11-19 David Malcolm <dmalcolm@redhat.com>
1461
1462 Merger of git branch "gimple-classes-v2-option-3".
1463 * ChangeLog.gimple-classes: New.
1464 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
1465 from being just a vec<gimple> to a vec<gbind *>.
1466
f8fc8b8e 14672014-11-18 Jakub Jelinek <jakub@redhat.com>
1468
1469 PR sanitizer/63813
1470 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
1471 argument to ptype, set type to TREE_TYPE (ptype). Don't call
1472 get_pointer_alignment for non-pointers. Use ptype, or if it is
1473 reference type, corresponding pointer type, as type of kind
1474 argument.
1475 (ubsan_maybe_instrument_reference,
1476 ubsan_maybe_instrument_member_call): Adjust callers.
1477
8315e35e 14782014-11-15 Marek Polacek <polacek@redhat.com>
1479
1480 PR middle-end/63884
1481 * array-notation-common.c (is_sec_implicit_index_fn): Return false
1482 for NULL fndecl.
1483 (extract_array_notation_exprs): Return for NULL node.
1484
86b9f14b 14852014-11-12 Joseph Myers <joseph@codesourcery.com>
1486
1487 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
1488 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
1489
0c93c8a9 14902014-11-12 Jakub Jelinek <jakub@redhat.com>
1491
1492 PR c/59708
1493 * c-common.c (check_builtin_function_arguments): Handle
1494 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
1495
fdd735a7 14962014-11-10 Andi Kleen <ak@linux.intel.com>
1497
1498 PR c/60804
1499 * c-common.h (check_no_cilk): Declare.
1500 * cilk.c (get_error_location): New function.
1501 (check_no_cilk): Dito.
1502
5cb678b4 15032014-11-10 Andi Kleen <ak@linux.intel.com>
1504
1505 * cilk.c (recognize_spawn): Use expression location
1506 for error message.
1507
0feb4de1 15082014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1509
1510 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
1511
3aa2fa44 15122014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
1513
1514 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
1515 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
1516 (__cpp_range_based_for, __cpp_initializer_lists,
1517 __cpp_delegating_constructors, __cpp_nsdmi,
1518 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
1519 for C++11; (__cpp_attribute_deprecated): Remove in favor of
1520 __has_cpp_attribute.
1521 * c-lex.c (cb_has_attribute): New callback CPP function;
1522 (init_c_lex): Set has_attribute callback.
1523
7fd22aae 15242014-11-04 Richard Biener <rguenther@suse.de>
1525
1526 * c-common.c (shorten_compare): Do not shorten mixed
1527 DFP and non-DFP compares.
1528
4af203ac 15292014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
1530
1531 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
1532 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
1533 Commentary and rearrangement of tests.
1534 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
1535 Commentary and rearrangement of tests.
1536 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
1537 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
1538
3754d046 15392014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1540
1541 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
1542 enum from machine_mode.
1543
1140c305 15442014-10-28 Andrew MacLeod <amacleod@redhat.com>
1545
1f78217c 1546 * c-common.c: Adjust include files.
1547 * c-gimplify.c: Ditto.
1548 * cilk.c: Ditto.
1549 * c-pragma.c: Ditto.
1550 * c-ubsan.c: Ditto.
1140c305 1551
94ea8568 15522014-10-27 Andrew MacLeod <amacleod@redhat.com>
1553
1554 * c-gimplify.c: Adjust include files.
1555
32ecf960 15562014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1557
1558 PR c++/53061
1559 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
1560 c_common_initialize_diagnostics.
1561 * c-common.h: Likewise.
1562
85fecbe2 15632014-10-24 Marek Polacek <polacek@redhat.com>
1564
1565 PR c/56980
1566 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
1567 print "struct"/"union"/"enum" for typedefed names.
1568
e7ec033a 15692014-10-23 Marek Polacek <polacek@redhat.com>
1570
1571 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
1572 in unsigned type.
1573
c2598081 15742014-10-22 Jakub Jelinek <jakub@redhat.com>
1575 Yury Gribov <y.gribov@samsung.com>
1576
1577 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
1578 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
1579 instead of flag_sanitize_recover as bool flag.
1580
acebb7e2 15812014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
1582
1583 * cilk.c: Revert previous change.
1584
6115016c 15852014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
1586
1587 PR c/63307
1588 * cilk.c: Include vec.h.
1589 (struct cilk_decls): New structure.
1590 (wrapper_parm_cb): Split this function to...
1591 (fill_decls_vec): ...this...
1592 (create_parm_list): ...and this.
1593 (compare_decls): New function.
1594 (for_local_cb): Remove.
1595 (wrapper_local_cb): Ditto.
1596 (build_wrapper_type): For now first traverse and fill vector of
1597 declarations then sort it and then deal with sorted vector.
1598 (cilk_outline): Ditto.
1599 (declare_one_free_variable): Ditto.
1600
e610d2b2 16012014-10-17 Marek Polacek <polacek@redhat.com>
1602
1603 * c-opts.c (c_common_post_options): Set warn_implicit_int.
1604 * c.opt (Wimplicit-int): Initialize to -1.
1605
a3020f2f 16062014-10-16 Andrew MacLeod <amacleod@redhat.com>
1607
1608 * c-pragma.c: Adjust include files.
1609 * c-semantics.c: Likewise.
1610
926ddd2c 16112014-10-16 DJ Delorie <dj@redhat.com>
1612
1613 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
1614 multiples of bytes.
1615
b0542e7c 16162014-10-14 Jason Merrill <jason@redhat.com>
1617
1618 PR c++/63455
1619 * c-common.h (CPP_PREPARSED_EXPR): New.
1620 (N_CP_TTYPES): Adjust.
1621
b2601928 16222014-10-15 Marek Polacek <polacek@redhat.com>
1623
1624 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
1625
9f75f026 16262014-10-14 DJ Delorie <dj@redhat.com>
1627
1628 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
1629 types, not just __int128.
1630 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
1631 types, not just __int128.
1632 (cpp_atomic_builtins): Round pointer sizes up.
1633 (type_suffix): Use type precision, not specific types.
1634 * c-common.c (c_common_reswords): Remove __int128 special case.
1635 (c_common_type_for_size): Check for all __intN types, not just
1636 __int128.
1637 (c_common_type_for_mode): Likewise.
1638 (c_common_signed_or_unsigned_type): Likewise.
1639 (c_build_bitfield_integer_type): Likewise.
1640 (c_common_nodes_and_builtins): Likewise.
1641 (keyword_begins_type_specifier): Likewise.
1642 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
1643 __intN variants.
1644
2ef51f0e 16452014-10-12 Trevor Saunders <tsaunders@mozilla.com>
1646
1647 * c-common.c: Use hash_table instead of hashtab.
1648
5b8257e3 16492014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
1650
1f78217c 1651 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
5b8257e3 1652 C++11 section.
1653
5e84569c 16542014-10-03 Marc Glisse <marc.glisse@inria.fr>
1655
1656 PR c++/54427
1657 PR c++/57198
1658 PR c++/58845
1659 * c-common.c (warn_logical_operator): Punt for vectors.
1660
f6751ff2 16612014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
1662
1663 Implement SD-6: SG10 Feature Test Recommendations
1664 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
1665 macros and the __has_header macro.
1666
c33e051d 16672014-09-30 Jason Merrill <jason@redhat.com>
1668
f76a9aa8 1669 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
1670 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
1671 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
1672
717e52f9 1673 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
1674 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
1675
c33e051d 1676 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
1677 * c-common.c (c_common_reswords): Remove __is_convertible_to.
1678
5213d6c9 16792014-09-24 Marek Polacek <polacek@redhat.com>
1680
1681 PR c/61405
1682 PR c/53874
1683 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
1684
6b722052 16852014-09-23 Andi Kleen <ak@linux.intel.com>
1686
1687 * c-common.c (handle_no_reorder_attribute): New function.
1688 (c_common_attribute_table): Add no_reorder attribute.
1689
0cb69d12 16902014-09-22 Joseph Myers <joseph@codesourcery.com>
1691
1692 * c-cppbuiltin.c (c_cpp_builtins): Define
1693 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
1694 modes.
1695
168dfbf0 16962014-09-18 Joseph Myers <joseph@codesourcery.com>
1697
1698 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
1699 for supported floating-point modes.
1700
b83705f4 17012014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
1702
1703 * c.opt (Wpsabi): Use LangEnabledBy.
1704 * c-opts.c (c_common_handle_option): Do not handle here.
1705
d5957f0d 17062014-09-12 Joseph Myers <joseph@codesourcery.com>
1707
1708 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
1709 macros for floating-point modes.
1710
bae6edff 17112014-09-11 Marc Glisse <marc.glisse@inria.fr>
1712
1713 PR target/58757
1714 * c-cppbuiltin.c (builtin_define_float_constants): Correct
1715 __*_DENORM_MIN__ without denormals.
1716
73a69d02 17172014-09-10 Jakub Jelinek <jakub@redhat.com>
1718
1719 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
1720 ubsan_instrument_vla, ubsan_instrument_return): Adjust
1721 ubsan_create_data callers.
1722 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
1723 index is constant or BIT_AND_EXPR with constant mask and is
1724 small enough for the bound.
1725 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
1726 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
1727
7ff8db31 17282014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
1729
1730 * c.opt: Add CppReason to various flags.
1731 (Wdate-time): Re-sort.
1732 * c-common.c: Include c-common.h earlier.
1733 (struct reason_option_codes_t): Delete.
1734 (c_option_controlling_cpp_error): Prefix global type and struct
1735 with cpp_.
1736
bcc1f37e 17372014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
1738
1739 * c.opt (Wnormalized): New.
1740 (Wnormalized=): Use Enum and Reject Negative.
1741 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
1742
b660d3c6 17432014-09-08 Joseph Myers <joseph@codesourcery.com>
1744
1745 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
1746 digits of floating-point modes if -fbuilding-libgcc.
1747
325b8c3c 17482014-09-05 Joseph Myers <joseph@codesourcery.com>
1749
1750 * c-cppbuiltin.c (c_cpp_builtins): Also define
1751 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
1752 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
1753 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
1754 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
1755 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
1756 __LIBGCC_STACK_GROWS_DOWNWARD__,
1757 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
1758 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
1759 __LIBGCC_DWARF_FRAME_REGISTERS__,
1760 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
1761 __LIBGCC_STACK_POINTER_REGNUM__ and
1762 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
1763 (builtin_define_with_value): Handle backslash-escaping in string
1764 macro values.
1765
1e074e77 17662014-09-05 Richard Biener <rguenther@suse.de>
1767
1768 PR middle-end/63148
1769 * c-format.c (check_format_arg): Properly handle
1770 effectively signed POINTER_PLUS_EXPR offset.
1771
04afd878 17722014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
1773
1774 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
1775 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
1776 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
1777 and Init.
1778 * c-opts.c (c_common_handle_option): Do not handle here.
1779 (sanitize_cpp_opts): Likewise.
1780 * c-common.c (struct reason_option_codes_t): Handle
1781 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
1782
a3f448f0 17832014-09-03 Marek Polacek <polacek@redhat.com>
1784
1785 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
1786
40750995 17872014-09-02 Jakub Jelinek <jakub@redhat.com>
1788 Balaji V. Iyer <balaji.v.iyer@intel.com>
1789 Igor Zamyatin <igor.zamyatin@intel.com>
1790
1791 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
1792 * c-common.c (c_common_reswords): Added _Cilk_for.
1793 * c-common.h (enum rid): Added RID_CILK_FOR.
1794 (cilk_for_number_of_iterations): Add declaration.
1795 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
1796 CILK_FOR.
1797 * c-pragma.c (init_pragma): Register "grainsize" pragma.
1798 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
1799
f0fbe519 18002014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1801
1802 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
1803 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
1804 Wundef): Use CPP, Var and Init.
1805 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
1806
a7d2e480 18072014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1808
1809 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
1810 * c-opts.c (c_common_handle_option): Do not handle here.
1811
c35e53f1 18122014-08-25 Jason Merrill <jason@redhat.com>
1813
1814 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
1815 -std=c++14 and -std=gnu++14, rather than the reverse.
1816 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
1817 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
1818 * c-common.h (cxx_dialect): Remove cxx1y.
1819
4e454776 18202014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
1821
1822 * c-common.h (enum cxx_dialect): Add cxx14.
1823 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
1824 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
1825 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
1826
af1a80f2 18272014-08-22 Jason Merrill <jason@redhat.com>
1828
1829 * c.opt (std=gnu++17): Fix alias.
1830
dc6229e8 18312014-08-22 Marek Polacek <polacek@redhat.com>
1832
1833 PR c++/62199
1834 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
1835 check for vector types. Drop LHS argument.
1836 * c-common.h (warn_logical_not_parentheses): Adjust.
1837
ba7f7c88 18382014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
1839
1840 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
1841 (Wmultichar): Likewise.
1842 (Wdate-time): Use C-family languages instead of Common. Use CPP
1843 and Var.
1844 * c-opts.c (c_common_handle_option): Do not handle the above
1845 options here.
1846 (sanitize_cpp_opts): Likewise.
1847
399d4f80 18482014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1849
1850 PR fortran/44054
1851 * c-opts.c: Include tree-diagnostics.h.
1852 (c_diagnostic_finalizer): New.
1853 (c_common_initialize_diagnostics): Use it.
1854
1babed5f 18552014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
1856
1857 PR preprocessor/51303
1858 * c-common.c (struct reason_option_codes_t option_codes):
1859 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
1860
3636964b 18612014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
1862
1863 PR c/60975
1864 PR c/53063
1865 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
1866 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
1867 (c_common_post_options): Call init_global_opts_from_cpp.
1868 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
1869
78bf4156 18702014-08-19 Marek Polacek <polacek@redhat.com>
1871
1872 PR c++/62153
1873 * c-common.c (maybe_warn_bool_compare): New function.
1874 * c-common.h (maybe_warn_bool_compare): Declare.
1875 * c.opt (Wbool-compare): New option.
1876
508ea33a 18772014-08-19 Marek Polacek <polacek@redhat.com>
1878
1879 * c.opt (Wc99-c11-compat): New option.
1880
806fe15e 18812014-08-19 Marek Polacek <polacek@redhat.com>
1882
1883 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
1884 to warn_c90_c99_compat.
1885 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
1886 to -1.
1887
6c867de1 18882014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
1889 Steven Bosscher <steven@gcc.gnu.org>
1890
1891 PR c/52952
1892 * c-format.c: Add extra_arg_loc and format_string_loc to struct
1893 format_check_results.
1894 (check_function_format): Use true and add comment for boolean
1895 argument.
1896 (finish_dollar_format_checking): Use explicit location when warning.
1897 (check_format_info): Likewise.
1898 (check_format_arg): Set extra_arg_loc and format_string_loc.
1899 (check_format_info_main): Use explicit location when warning.
1900 (check_format_types): Pass explicit location.
1901 (format_type_warning): Likewise.
1902
dc8078a3 19032014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
1904
1905 PR fortran/44054
1906 * c-format.c: Handle Fortran flags.
1907
d271ec7e 19082014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
1909
1910 PR other/61962
1911 * array-notation-common.c (find_rank): Added handling for other
1912 types of references.
1913
890c2e2f 19142014-08-10 Marek Polacek <polacek@redhat.com>
1915
1916 PR c/51849
1917 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
1918 * c.opt (Wc90-c99-compat): Add option.
1919
7149db5f 19202014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1921
1922 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
1923
2d2f6a15 19242014-08-03 Marek Polacek <polacek@redhat.com>
1925
1926 * c-common.c (check_case_value): Add location_t parameter. Use it.
1927 (c_add_case_label): Pass loc to check_case_value.
1928
06ecf488 19292014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1930
1931 * cilk.c: Use hash_map instead of pointer_map.
1932
431205b7 19332014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1934
1935 * c-gimplify.c: Use hash_set instead of pointer_set.
1936
3394c80c 19372014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1938
1939 PR middle-end/61455
1940 * array-notation-common.c (extract_array_notation_exprs): Handling
1941 of DECL_EXPR added.
1942
392dee1e 19432014-08-01 Jakub Jelinek <jakub@redhat.com>
1944
1945 * c-common.h (min_align_of_type): Removed prototype.
1946 * c-common.c (min_align_of_type): Removed.
1947 * c-ubsan.h (ubsan_maybe_instrument_reference,
1948 ubsan_maybe_instrument_member_call): New prototypes.
1949 * c-ubsan.c: Include stor-layout.h and builtins.h.
1950 (ubsan_maybe_instrument_reference_or_call,
1951 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
1952 functions.
1953
f22a2cb7 19542014-07-31 Marc Glisse <marc.glisse@inria.fr>
1955
1956 PR c++/60517
1957 * c.opt (-Wreturn-local-addr): Move to common.opt.
1958
87b0198f 19592014-07-30 Jason Merrill <jason@redhat.com>
1960
1961 PR c++/61659
1962 PR c++/61687
1963 Revert:
1964 * c.opt (-fuse-all-virtuals): New.
1965
74691f46 19662014-07-30 Tom Tromey <tromey@redhat.com>
1967
1968 PR c/59855
1969 * c.opt (Wdesignated-init): New option.
1970 * c-common.c (c_common_attribute_table): Add "designated_init".
1971 (handle_designated_init): New function.
1972
9140d56f 19732014-07-24 Marek Polacek <polacek@redhat.com>
1974
1975 PR c/57653
1976 * c-opts.c (c_finish_options): If -imacros is in effect, return.
1977
a09c5cc2 19782014-07-16 Dodji Seketeli <dodji@redhat.com>
1979
1980 PR preprocessor/60723 - missing system-ness marks for macro tokens
1981 * c-ppoutput.c (struct print::prev_was_system_token): New data
1982 member.
1983 (init_pp_output): Initialize it.
1984 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
1985 (do_line_change): Return a flag saying if a line marker was
1986 emitted or not.
1987 (scan_translation_unit): Detect if the system-ness of the token we
1988 are about to emit is different from the one of the previously
1989 emitted token. If so, emit a line marker. Avoid emitting useless
1990 adjacent line markers. Avoid emitting line markers for tokens
1991 originating from the expansion of built-in macros.
1992 (scan_translation_unit_directives_only): Adjust.
1993
2b25b62f 19942014-07-15 Marek Polacek <polacek@redhat.com>
1995
1996 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
1997 TYPE_MAX_VALUE is NULL.
1998
305d96bc 19992014-07-14 Jakub Jelinek <jakub@redhat.com>
2000
2001 PR middle-end/61294
2002 * c.opt (Wmemset-transposed-args): New warning.
2003
8ea4660d 20042014-07-10 Jason Merrill <jason@redhat.com>
2005
2006 PR c++/61659
2007 PR c++/61687
2008 * c.opt (-fuse-all-virtuals): New.
2009
cd480f3d 20102014-07-09 Richard Biener <rguenther@suse.de>
2011
2012 PR c-family/61741
2013 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
2014 using unsigned arithmetic if overflow does not wrap instead of
2015 if overflow is undefined.
2016
87d59e72 20172014-07-06 Marek Polacek <polacek@redhat.com>
2018
2019 PR c/6940
2020 * c.opt (Wsizeof-array-argument): New option.
2021
d69521d8 20222014-07-03 Jakub Jelinek <jakub@redhat.com>
2023
8204c077 2024 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
d69521d8 2025 comments->count <= 1, as comments->entries might be NULL.
2026
1207866e 20272014-07-01 Marek Polacek <polacek@redhat.com>
2028
2029 * c.opt (Wint-conversion): New option.
2030
7a6bbb76 20312014-07-01 Marek Polacek <polacek@redhat.com>
2032
2033 PR c/58286
2034 * c.opt (Wincompatible-pointer-types): New option.
2035
9d4eeb52 20362014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
2037
2038 PR c++/51400
2039 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
2040 Do not discard TYPE_QUALS of type.
2041
4b53bc0f 20422014-06-26 Jason Merrill <jason@redhat.com>
2043
2044 * c-common.h (enum cxx_dialect): Add cxx1z.
2045 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
2046 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
2047
a8a8d4ea 20482014-06-26 Teresa Johnson <tejohnson@google.com>
2049
2050 * c-common.h (get_dump_info): Declare.
2051 * c-gimplify.c (c_genericize): Use saved dump files.
2052 * c-opts.c (c_common_parse_file): Begin and end dumps
2053 once around parsing invocation.
2054 (get_dump_info): New function.
2055
1f6be080 20562014-06-23 Marek Polacek <polacek@redhat.com>
2057 Andrew MacLeod <amacleod@redhat.com>
2058
2059 PR c/61553
2060 * c-common.c (get_atomic_generic_size): Don't segfault if the
2061 type doesn't have a size.
2062
5ef6b660 20632014-06-20 Marek Polacek <polacek@redhat.com>
2064
2065 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
2066 (ubsan_walk_array_refs_r): New function.
2067 (c_genericize): Instrument array bounds.
2068 * c-ubsan.c: Include "internal-fn.h".
2069 (ubsan_instrument_division): Mark instrumented arrays as having
2070 side effects. Adjust ubsan_type_descriptor call.
2071 (ubsan_instrument_shift): Likewise.
2072 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
2073 (ubsan_instrument_bounds): New function.
2074 (ubsan_array_ref_instrumented_p): New function.
2075 (ubsan_maybe_instrument_array_ref): New function.
2076 * c-ubsan.h (ubsan_instrument_bounds): Declare.
2077 (ubsan_array_ref_instrumented_p): Declare.
2078 (ubsan_maybe_instrument_array_ref): Declare.
2079
20802014-06-20 Hale Wang <hale.wang@arm.com>
3ccd1e6e 2081
2082 PR lto/61123
2083 * c.opt (fshort-enums): Add to LTO.
2084 * c.opt (fshort-wchar): Likewise.
2085
78438f31 20862014-06-16 Marek Polacek <polacek@redhat.com>
2087
2088 PR c/60439
2089 * c.opt (Wswitch-bool): Add Var.
2090
5fddcf34 20912014-06-12 Jakub Jelinek <jakub@redhat.com>
2092
2093 PR middle-end/61486
2094 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
2095 #pragma omp target teams or
2096 #pragma omp {,target }teams distribute simd.
2097
74b777e5 20982014-06-12 Jason Merrill <jason@redhat.com>
2099
2100 * c.opt (Wabi=, fabi-compat-version): New.
2101 * c-opts.c (c_common_handle_option): Handle -Wabi=.
2102 (c_common_post_options): Handle flag_abi_compat_version default.
2103 Disallow -fabi-compat-version=1.
2104 * c-common.h (abi_version_crosses): New.
2105
738a6bda 21062014-06-11 Jan Hubicka <hubicka@ucw.cz>
2107
1f78217c 2108 * c-common.c (handle_section_attribute): Update handling for
738a6bda 2109 section names that are no longer trees.
2110
cf5f881f 21112014-06-10 Jakub Jelinek <jakub@redhat.com>
2112
2113 PR fortran/60928
2114 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
2115 (omp_pragmas): ... back here.
2116
32dc1512 21172014-06-05 Marek Polacek <polacek@redhat.com>
2118
2119 PR c/49706
2120 * c-common.c (warn_logical_not_parentheses): New function.
2121 * c-common.h (warn_logical_not_parentheses): Declare.
2122 * c.opt (Wlogical-not-parentheses): New option.
2123
f61a9bc2 21242014-06-04 Marek Polacek <polacek@redhat.com>
2125
2126 PR c/30020
2127 * c-common.c (check_case_bounds): Add location parameter.
2128 Use it.
2129 (c_add_case_label): Pass loc to check_case_bounds.
2130
c69ec07d 21312014-06-03 Marek Polacek <polacek@redhat.com>
2132
2133 PR c/60439
2134 * c.opt (Wswitch-bool): New option.
2135
3c77ca67 21362014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2137
68a2c870 2138 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
2139 Remove prototypes.
2140 (record_types_used_by_current_var_decl): Move prototype to where
2141 it belongs.
2142
3c77ca67 2143 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
2144 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
2145 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
2146
3ab4693e 21472014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2148
2149 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
2150 * c-common.c (c_common_nodes_and_builtins): Don't initialize
2151 void_zero_node.
2152 * c-pretty-print.c (pp_c_void_constant): New function.
2153 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
2154 (c_pretty_printer::expression): Handle VOID_CST.
2155 * cilk.c (extract_free_variables): Likewise.
2156 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
2157 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
2158
25a27413 21592014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2160
2161 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
2162 * c-pragma.c (push_alignment): Adjust.
2163 (handle_pragma_push_options): Likewise.
2164
3e5a8b00 21652014-05-09 Marek Polacek <polacek@redhat.com>
2166
2167 PR c/50459
2168 * c-common.c (check_user_alignment): Return -1 if alignment is error
2169 node.
2170 (handle_aligned_attribute): Don't call default_conversion on
2171 FUNCTION_DECLs.
2172 (handle_vector_size_attribute): Likewise.
2173 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
2174 (handle_sentinel_attribute): Call default_conversion and allow even
2175 integral types as an argument.
2176
c2c4ae8d 21772014-05-08 Marek Polacek <polacek@redhat.com>
2178
2179 PR c/61053
2180 * c-common.c (min_align_of_type): New function factored out from...
2181 (c_sizeof_or_alignof_type): ...here.
2182 * c-common.h (min_align_of_type): Declare.
2183
2026249a 21842014-05-08 Marek Polacek <polacek@redhat.com>
2185
2186 PR c/61077
2187 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
2188 parameter type of main.
2189
33c8dcfe 21902014-05-07 DJ Delorie <dj@redhat.com>
2191
2192 * c-cppbuiltin.c (print_bits_of_hex): New.
2193 (builtin_define_type_minmax): Print values using hex so as not to
2194 require a pre-computed list of string values.
2195
960d5a55 21962014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2197 Mike Stump <mikestump@comcast.net>
2198 Richard Sandiford <rdsandiford@googlemail.com>
2199
2200 * c-ada-spec.c: Include wide-int.h.
2201 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
2202 (dump_generic_ada_node): Use wide-int interfaces.
2203 * c-common.c: Include wide-int-print.h.
2204 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
2205 (pointer_int_sum): Use wide-int interfaces.
2206 (c_common_nodes_and_builtins): Use make_int_cst.
2207 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
2208 (handle_alloc_size_attribute): Use wide-int interfaces.
2209 (get_nonnull_operand): Likewise.
2210 * c-format.c (get_constant): Use tree_fits_uhwi_p.
2211 * c-lex.c: Include wide-int.h.
2212 (narrowest_unsigned_type): Take a widest_int rather than two
2213 HOST_WIDE_INTs.
2214 (narrowest_signed_type): Likewise.
2215 (interpret_integer): Update accordingly. Use wide-int interfaces.
2216 (lex_charconst): Use wide-int interfaces.
2217 * c-pretty-print.c: Include wide-int.h.
2218 (pp_c_integer_constant): Use wide-int interfaces.
2219 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
2220 INT_CST_LT_UNSIGNED.
2221
bbb88b31 22222014-05-06 Richard Biener <rguenther@suse.de>
2223
2224 * c-opts.c (c_common_post_options): For -freestanding,
2225 -fno-hosted and -fno-builtin disable pattern recognition
2226 if not enabled explicitely.
2227
022d4718 22282014-05-02 Marek Polacek <polacek@redhat.com>
2229
2230 * c.opt (Wsizeof-pointer-memaccess): Describe option.
2231
e4ab2ef3 22322014-05-01 Marek Polacek <polacek@redhat.com>
2233
2234 PR c/43245
2235 * c.opt (Wdiscarded-qualifiers): Add.
2236
52cc0072 22372014-04-30 Marek Polacek <polacek@redhat.com>
2238
2239 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
2240 INT_MIN / -1 sanitization only for integer types.
2241
4a026b48 22422014-04-25 Marek Polacek <polacek@redhat.com>
2243
2244 PR c/18079
2245 * c-common.c (handle_noinline_attribute): Warn if the attribute
2246 conflicts with always_inline attribute.
2247 (handle_always_inline_attribute): Warn if the attribute conflicts
2248 with noinline attribute.
2249
90e645fa 22502014-04-25 Marek Polacek <polacek@redhat.com>
2251
2252 PR c/60156
2253 * c-common.c (check_main_parameter_types): Warn about variadic main.
2254
db103ea4 22552014-04-24 Mike Stump <mikestump@comcast.net>
2256
2257 * c.opt (Wshadow-ivar): Default to on.
2258
06511efd 22592014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
2260
2261 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
2262
cdf34fca 22632014-04-23 Marek Polacek <polacek@redhat.com>
2264
2265 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
2266
7311d7c1 22672014-04-22 Jakub Jelinek <jakub@redhat.com>
2268
2269 PR sanitizer/60275
2270 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
2271 if flag_sanitize_undefined_trap_on_error.
2272 (ubsan_instrument_division, ubsan_instrument_shift,
2273 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
2274 if !flag_sanitize_recover.
2275
c1917557 22762014-04-22 Marc Glisse <marc.glisse@inria.fr>
2277
2278 PR libstdc++/43622
2279 * c-common.c (registered_builtin_types): Make non-static.
2280 * c-common.h (registered_builtin_types): Declare.
2281
b2ca6510 22822014-04-14 Richard Biener <rguenther@suse.de>
2283 Marc Glisse <marc.glisse@inria.fr>
2284
2285 PR c/60819
2286 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
2287 apply may-alias the scalar pointer type when applicable.
2288
855372a3 22892014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2290
2291 PR middle-end/60467
2292 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
2293 as possible argument for Cilk_spawn.
2294
4012a986 22952014-04-11 Tobias Burnus <burnus@net-b.de>
2296
2297 PR c/60194
2298 * c.opt (Wformat-signedness): Add
2299 * c-format.c(check_format_types): Use it.
2300
0d284870 23012014-04-11 Jason Merrill <jason@redhat.com>
2302
2303 PR c++/57926
2304 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
2305 default_conversion for an array argument.
2306
a34c1231 23072014-04-08 Marek Polacek <polacek@redhat.com>
2308
2309 PR sanitizer/60745
2310 * c-ubsan.c: Include asan.h.
2311 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
2312
a35a8e18 23132014-04-03 Nathan Sidwell <nathan@codesourcery.com>
2314
2315 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
2316
b23e42b6 23172014-04-02 Marek Polacek <polacek@redhat.com>
2318
2319 * c-common.h (c_expand_expr): Remove declaration.
2320
5a672e62 23212014-03-28 Jakub Jelinek <jakub@redhat.com>
2322
2323 PR c++/60689
2324 * c-common.c (add_atomic_size_parameter): When creating new
2325 params vector, push the size argument first.
2326
d4d068c0 23272014-03-26 Jakub Jelinek <jakub@redhat.com>
2328
2329 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
2330 ubsan_instrument_vla, ubsan_instrument_return): Adjust
2331 ubsan_create_data callers.
2332
446bdf5f 23332014-03-22 Jakub Jelinek <jakub@redhat.com>
2334
2335 PR debug/60603
2336 * c-opts.c (c_finish_options): Restore cb_file_change call to
2337 <built-in>.
2338
8895f0a3 23392014-03-13 Jakub Jelinek <jakub@redhat.com>
2340
2341 PR middle-end/36282
2342 * c-pragma.c (apply_pragma_weak): Only look at
2343 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
2344 DECL_ASSEMBLER_NAME_SET_P (decl).
2345 (maybe_apply_pending_pragma_weaks): Exit early if
2346 vec_safe_is_empty (pending_weaks) rather than only when
2347 !pending_weaks.
2348 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
2349 set assembler name back to NULL afterwards.
2350
7a5da2cd 23512014-03-11 Jason Merrill <jason@redhat.com>
2352
2353 * c.opt: Add -std=gnu++14.
2354
95093889 23552014-03-11 Ian Bolton <ian.bolton@arm.com>
2356
2357 * c-opts.c (c_common_post_options): Don't override
2358 -ffp-contract=fast if unsafe-math-optimizations is on.
2359
c9a24b37 23602014-03-08 Paulo Matos <paulo@matos-sorge.com>
2361
2362 * c.opt: Enable LTO FE for fshort-double.
2363
3f6dba6e 23642014-03-07 Jason Merrill <jason@redhat.com>
2365
2366 * c.opt: Add -std=c++14.
2367
3bfdc94f 23682014-03-06 Marek Polacek <polacek@redhat.com>
2369
2370 PR c/60197
2371 * cilk.c (contains_cilk_spawn_stmt): New function.
2372 (contains_cilk_spawn_stmt_walker): Likewise.
2373 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
2374 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
2375
8b3a6a4c 23762014-03-03 Jakub Jelinek <jakub@redhat.com>
2377
2378 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
2379 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
2380 even when flag_preprocess_only.
2381
734ec290 23822014-02-26 Jason Merrill <jason@redhat.com>
2383
2384 PR c++/59231
2385 PR c++/11586
2386 * c-common.c (shorten_compare): Don't check
2387 c_inhibit_evaluation_warnings.
2388
81aec8b8 23892014-02-19 Jakub Jelinek <jakub@redhat.com>
2390
d1081017 2391 PR c/37743
2392 * c-common.c (c_common_nodes_and_builtins): When initializing
2393 c_uint{16,32,64}_type_node, also set corresponding
2394 uint{16,32,64}_type_node to the same value.
2395
81aec8b8 2396 PR c++/60267
2397 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
2398 for PRAGMA_IVDEP if flag_preprocess_only.
2399
312243bb 24002014-02-12 Jakub Jelinek <jakub@redhat.com>
2401
2402 PR c/60101
2403 * c-common.c (merge_tlist): If copy is true, call new_tlist,
2404 if false, add ADD itself, rather than vice versa.
2405 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
2406 copy. For SAVE_EXPR, only call merge_tlist once.
2407
237e78b1 24082014-02-08 Jakub Jelinek <jakub@redhat.com>
2409
2410 PR middle-end/60092
2411 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
2412 and tree_to_uhwi.
2413 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
2414 functions.
2415 (c_common_attribute_table): Add alloc_align and assume_aligned
2416 attributes.
2417
76fdceeb 24182014-02-06 Marek Polacek <polacek@redhat.com>
2419
2420 PR c/60087
2421 * c-common.c (warn_for_sign_compare): Call warning_at with location
2422 instead of warning.
2423
4a4dea42 24242014-02-05 Marek Polacek <polacek@redhat.com>
2425
2426 PR c/53123
2427 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
2428 statement.
2429
ec704957 24302014-02-04 Marek Polacek <polacek@redhat.com>
2431
2432 PR c/60036
2433 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
2434 SAVE_EXPR.
2435
caf62483 24362014-02-03 Marc Glisse <marc.glisse@inria.fr>
2437
2438 PR c++/53017
2439 PR c++/59211
2440 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
2441 handle_vector_size_attribute, handle_nonnull_attribute): Call
2442 default_conversion on the attribute argument.
2443 (handle_nonnull_attribute): Increment the argument number.
2444
ec761d5a 24452014-01-31 Marek Polacek <polacek@redhat.com>
2446
2447 PR c/59963
2448 * c-common.c (add_atomic_size_parameter): Pass vNULL to
2449 build_function_call_vec.
2450 (resolve_overloaded_builtin): Likewise.
2451 * c-common.h (build_function_call_vec): Adjust declaration.
2452
22a75734 24532014-01-30 Marek Polacek <polacek@redhat.com>
2454
2455 PR c/59940
2456 * c-common.h (unsafe_conversion_p): Adjust declaration.
2457 (warnings_for_convert_and_check): Likewise.
2458 (convert_and_check): Likewise.
2459 * c-common.c (unsafe_conversion_p): Add location parameter. Call
2460 expansion_point_location_if_in_system_header on it.
2461 (warnings_for_convert_and_check): Add location parameter. Call
2462 expansion_point_location_if_in_system_header on it. Use it.
2463 (convert_and_check): Add location parameter. Use it.
2464 (conversion_warning): Likewise.
2465 (c_add_case_label): Adjust convert_and_check calls.
2466 (scalar_to_vector): Adjust unsafe_conversion_p calls.
2467
a89e6c15 24682014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2469
2470 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
2471 flag_cilkplus.
2472 * c-pragma.c (init_pragma): Likewise.
2473 * c.opt: Likewise.
2474
2623625f 24752014-01-23 Marek Polacek <polacek@redhat.com>
2476
2477 PR c/59846
2478 * c-common.c (shorten_compare): Add location_t parameter.
2479 * c-common.h (shorten_binary_op): Adjust declaration.
2480
46da3601 24812014-01-23 Marek Polacek <polacek@redhat.com>
2482
2483 PR c/58346
2484 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
2485 * c-common.h: Declare it.
2486
c9743c6a 24872014-01-20 Eric Botcazou <ebotcazou@adacore.com>
2488
2489 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
2490 * c-ada-spec.c (dump_ads): Likewise.
2491 (cpp_check): Likewise.
2492 (dump_ada_specs): Likewise.
2493
24942014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
36e33c6a 2495
2496 PR c++/49718
2497 * c-common.c (handle_no_instrument_function_attribute): Allow
2498 no_instrument_function attribute in class member
2499 definition/declaration.
2500
1248c663 25012014-01-15 Jakub Jelinek <jakub@redhat.com>
2502
2503 PR c/58943
2504 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
2505 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
2506 being COMPOUND_EXPR.
2507 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
2508 operand a SAVE_EXPR and second MODIFY_EXPR.
2509
6e5c480b 25102014-01-09 Jakub Jelinek <jakub@redhat.com>
2511
2512 PR target/58115
2513 * c-pch.c (c_common_write_pch): Call
2514 prepare_target_option_nodes_for_pch.
2515
3aea1f79 25162014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2517
2518 Update copyright years
2519
e4f22041 25202014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2521
2522 * array-notation-common.c, c-cilkplus.c: Use the standard form for
2523 the copyright notice.
2524
7fb0fe24 25252013-12-28 Eric Botcazou <ebotcazou@adacore.com>
2526
2527 * c-ada-spec.c (print_constructor): New function.
2528 (print_destructor): Retrieve the origin of the destructor.
2529 (print_ada_declaration): Revamp handling of constructors/destructors.
2530
468088ac 25312013-12-23 Stuart Hastings <stuart@apple.com>
2532 Bill Maddox <maddox@google.com>
2533 Jason Merrill <jason@redhat.com>
2534
2535 * c.opt: Add -fdeclone-ctor-dtor.
2536 * c-opts.c (c_common_post_options): Default to on iff -Os.
2537
74acc703 25382013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2539
2540 * c-common.c (c_common_attribute_table): Added "cilk simd function"
2541 attribute.
2542 * c-pragma.h (enum pragma_cilk_clause): Remove.
2543 (enum pragma_omp_clause): Added the following fields:
2544 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
2545 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
2546 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
2547 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
2548 PRAGMA_CILK_CLAUSE_UNIFORM.
2549
8204c077 2550
433e804e 25512013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2552
2553 * cilk.c (cilk_outline): Made this function non-static.
2554 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
2555 (create_cilk_wrapper): Added a new parameter: a function pointer.
2556 (c_install_body_w_frame_cleanup): Remove
2557 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
2558 * c-common.h (cilk_outline): New prototype.
2559 (gimplify_cilk_spawn): Removed two parameters.
2560 (cilk_install_body_with_frame_cleanup): New prototype.
2561 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
2562 CILK_SPAWN_STMT case.
2563
5bcc7e60 25642013-12-11 Bernd Schmidt <bernds@codesourcery.com>
2565
e66325ea 2566 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
2567
5bcc7e60 2568 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
2569 (int_array_type_node): Remove.
2570 * c-common.c (c_common_nodes_and_builtins): Don't build it.
2571
0b26ec77 25722013-12-05 Marek Polacek <polacek@redhat.com>
2573
2574 PR c/52023
2575 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
2576 [ADJUST_FIELD_ALIGN].
2577
a179a7dc 25782013-12-04 Joseph Myers <joseph@codesourcery.com>
2579
2580 PR c/52023
2581 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
2582 and check field alignment if set.
2583 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
2584 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
2585
8204c077 25862013-12-04 Jakub Jelinek <jakub@redhat.com>
137559b2 2587 Marek Polacek <polacek@redhat.com>
2588
2589 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
2590 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
2591
648fd348 25922013-11-29 H.J. Lu <hongjiu.lu@intel.com>
2593
2594 PR c/59309
2595 * cilk.c (gimplify_cilk_spawn): Properly handle function without
2596 arguments.
2597
253e1cae 25982013-11-29 Jakub Jelinek <jakub@redhat.com>
2599
2600 PR c/59280
2601 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
2602 goto invalid. If it is error_mark_node, don't issue further
2603 diagnostics.
2604
3e398f5b 26052013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
2606
2607 * c.opt (Wopenmp-simd): New.
2608
020bc656 26092013-11-22 Jakub Jelinek <jakub@redhat.com>
2610
2611 * c-ubsan.h (ubsan_instrument_return): New prototype.
2612 * c-ubsan.c (ubsan_instrument_return): New function.
2613
bc61cadb 26142013-11-22 Andrew MacLeod <amacleod@redhat.com>
2615
2616 * c-common.c: Add required include files from gimple.h.
2617 * c-gimplify.c: Likewise
2618 * cilk.c: Likewise
2619
3df42822 26202013-11-22 David Malcolm <dmalcolm@redhat.com>
2621
2622 * c-common.c (unsafe_conversion_p): Remove use of
2623 EXPR_LOC_OR_HERE macro.
2624 (conversion_warning): Likewise.
2625 (warnings_for_convert_and_check): Likewise.
2626 (warn_for_collisions_1): Likewise.
2627 (shorten_compare): Likewise, and remove use of in_system_header
2628 macro, using the location from the former.
2629 * c-lex.c (dump_one_header): Remove use of input_filename macro.
2630 (cb_def_pragma): Remove use of in_system_header macro.
2631 (lex_string): Likewise.
2632 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
2633
8c53c46c 26342013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
2635 Mike Stump <mikestump@comcast.net>
2636 Richard Sandiford <rdsandiford@googlemail.com>
2637
2638 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
2639 instead of TREE_INT_CST_LOW, in cases where there is a protecting
2640 tree_fits_shwi_p or tree_fits_uhwi_p.
2641 (dump_generic_ada_node): Likewise.
2642 * c-format.c (check_format_arg): Likewise.
2643 * c-pretty-print.c (pp_c_integer_constant): Likewise.
2644
5200ef07 26452013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
2646
2647 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
2648
ca9d7d74 26492013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
2650
2651 PR c/53001
2652 * c-common.c (unsafe_conversion_p): Make this function
2653 return an enumeration with more detail.
2654 (conversion_warning): Use the new return type of
2655 unsafe_conversion_p to separately warn either about conversions
2656 that lower floating point number precision or about the other
2657 kinds of conversions.
2658 * c-common.h (enum conversion_safety): New enumeration.
2659 (unsafe_conversion_p): switching return type to
2660 conversion_safety enumeration.
2661 * c.opt: Adding new warning -Wfloat-conversion and
2662 enabling it with -Wconversion.
2663
0391a567 26642013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
2665
2666 * c-opts.c: Include plugin.h.
2667 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
2668
19b928d9 26692013-11-19 Marek Polacek <polacek@redhat.com>
2670
2671 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
2672 call.
2673 (ubsan_instrument_shift): Likewise.
2674 (ubsan_instrument_vla): Likewise.
2675
aa59f000 26762013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2677
2678 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
2679 cast to unsigned type.
2680
08f817b3 26812013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2682
2683 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
2684 tree_low_cst.
2685 (complete_array_type): Update comment to refer to tree_to_[su]hwi
2686 rather than tree_low_cst.
2687
6a0712d4 26882013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2689
2690 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
2691 tree_to_uhwi throughout.
2692
fcb97e84 26932013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2694
2695 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
2696 tree_low_cst (..., 0) with tree_to_shwi throughout.
2697
cd4547bf 26982013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2699
2700 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
2701 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
2702
35ec552a 27032013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2704
2705 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
2706 host_integerp (..., 0) with tree_fits_shwi_p throughout.
2707
f2697631 27082013-11-15 Aldy Hernandez <aldyh@redhat.com>
2709
2710 * c-cilkplus.c: New file.
2711 * c-common.c (readonly_error): Add location argument.
2712 * c-common.h (readonly_error): Same.
2713 (c_finish_cilk_clauses): Protoize.
2714 (c_check_cilk_loop): Same.
2715 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
2716 Do not fail on error_mark_node.
2717 Abstract increment canonicalization to here...
2718 (c_omp_for_incr_canonicalize_ptr): New.
2719 c-pragma.c (init_pragma): Register "simd" pragma.
2720 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
2721 (enum pragma_cilk_clause): New.
2722
0aa8c34e 27232013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
2724
2725 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
2726 wchar_type and host_integerp checks.
2727
e795d6e1 27282013-11-14 Andrew MacLeod <amacleod@redhat.com>
2729
2730 * c-common.c: Likewise.
2731 * c-gimplify.c: Likewise.
2732 * cilk.c: Likewise.
2733
9ed99284 27342013-11-14 Diego Novillo <dnovillo@google.com>
2735
2736 * c-common.c: Include fold-const.h.
2737 Include stor-layout.h.
2738 Include calls.h.
2739 Include stringpool.h.
2740 Include attribs.h.
2741 Include varasm.h.
2742 Include trans-mem.h.
2743 * c-cppbuiltin.c: Include stor-layout.h.
2744 Include stringpool.h.
2745 * c-format.c: Include stringpool.h.
2746 * c-lex.c: Include stringpool.h.
2747 Include stor-layout.h.
2748 * c-pragma.c: Include stringpool.h.
2749 Include attribs.h.
2750 Include varasm.h.
2751 Include gcc-symtab.h.
2752 * c-pretty-print.c: Include stor-layout.h.
2753 Include attribs.h.
2754 * cilk.c: Include stringpool.h.
2755 Include calls.h.
2756
4fba5eb9 27572013-11-13 Joseph Myers <joseph@codesourcery.com>
2758
2759 * c-common.h (enum rid): Add RID_AUTO_TYPE.
2760 * c-common.c (c_common_reswords): Add __auto_type.
2761 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
2762
a8783bee 27632013-11-12 Andrew MacLeod <amacleod@redhat.com>
2764
e795d6e1 2765 * c-common.c: Include gimplify.h.
2766 * c-gimplify.c: Likewise.
2767 * cilk.c: Likewise.
2768 * c-omp.c: Include gimple-expr.h instead of gimple.h.
2769 * c-ubsan.c: Don't include gimple.h.
a8783bee 2770
d184e0c0 27712013-11-12 Joseph Myers <joseph@codesourcery.com>
2772
2773 * c-common.c (c_common_reswords): Add _Thread_local.
2774
a056826c 27752013-11-09 Joseph Myers <joseph@codesourcery.com>
2776
2777 * c-common.c (atomic_size_supported_p): New function.
2778 (resolve_overloaded_atomic_exchange)
2779 (resolve_overloaded_atomic_compare_exchange)
2780 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
2781 Use it instead of comparing size with a local list of sizes.
2782
b560fabd 27832013-11-07 Andrew MacLeod <amacleod@redhat.com>
2784 Joseph Myers <joseph@codesourcery.com>
2785
2786 * c-common.h (enum rid): Add RID_ATOMIC.
2787 * c-common.c (c_common_reswords): Add _Atomic.
2788 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
2789 (keyword_is_type_qualifier): Accept RID_ATOMIC.
2790 * c-format.c (check_format_types): Check for extra _Atomic
2791 qualifiers in format argument.
2792 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
2793 (pp_c_type_qualifier_list): Mention _Atomic in comment.
2794
5b1a0622 27952013-11-06 Tobias Burnus <burnus@net-b.de>
2796
2797 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
2798
4f8f4cb8 27992013-11-06 Joseph Myers <joseph@codesourcery.com>
2800
2801 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
2802 standards modes.
2803 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
2804 to mean lack of IEEE 754 support.
2805
9148bda3 28062013-11-05 Tobias Burnus <burnus@net-b.de>
2807
2808 * c.opt (-Wdate-time): New option
2809 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
2810
08c5f4d5 28112013-11-05 Joseph Myers <joseph@codesourcery.com>
2812
2813 * c-cppbuiltin.c (cpp_iec_559_value): Test
2814 flag_excess_precision_cmdline not flag_excess_precision.
2815
c630ef93 28162013-11-05 Tobias Burnus <burnus@net-b.de>
2817
2818 * c.opt (fopenmp-simd): New option.
2819 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
2820 (omp_pragmas): ... this new struct.
2821 (c_pp_lookup_pragma): Also walk omp_pragmas.
2822 (init_pragma): Init pragmas for -fopenmp-simd.
2823
7354a89b 28242013-11-04 Marek Polacek <polacek@redhat.com>
2825
2826 PR c++/58979
2827 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
2828
4c866b9b 28292013-11-04 Joseph Myers <joseph@codesourcery.com>
2830
2831 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
2832 New functions.
2833 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
2834
e2a6a333 28352013-11-04 Eric Botcazou <ebotcazou@adacore.com>
2836
2837 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
2838 (dump_ada_specs): Adjust prototype of second callback.
2839 * c-ada-spec.c (cpp_check): New global variable.
2840 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
2841 (print_generic_ada_decl): Likewise.
2842 (has_static_fields): Change return type to bool and add guard.
2843 (has_nontrivial_methods): New predicate.
2844 (is_tagged_type): Change return type to bool.
2845 (separate_class_package): Call has_nontrivial_methods.
2846 (pp_ada_tree_identifier): Minor tweaks.
2847 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
2848 (dump_ada_array_domains): Likewise.
2849 (dump_ada_array_type): Likewise.
2850 (dump_template_types): Remove cpp_check parameter and do not pass it to
2851 dump_generic_ada_node.
2852 (dump_ada_template): Likewise.
2853 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
2854 recursively.
2855 (print_ada_methods): Change return type to integer. Remove cpp_check
2856 parameter and do not pass it down.
2857 (dump_nested_types): Remove cpp_check parameter and do not pass it to
2858 dump_generic_ada_node.
2859 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
2860 accessing methods.
2861 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
2862 down. Use has_nontrivial_methods to recognize C++ classes. Use return
2863 value of print_ada_methods.
2864 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
2865 Set cpp_check to it before invoking dump_ada_nodes.
2866 (dump_ada_specs): Likewise.
2867
2c4c3477 28682013-11-03 Marek Polacek <polacek@redhat.com>
2869
2870 * c-ubsan.c: Don't include hash-table.h.
2871 (ubsan_instrument_vla): New function.
2872 * c-ubsan.h: Declare it.
2873
452659af 28742013-10-31 David Malcolm <dmalcolm@redhat.com>
2875
2876 Automated part of renaming of symtab_node_base to symtab_node.
2877
2878 Patch autogenerated by rename_symtab.py from
2879 https://github.com/davidmalcolm/gcc-refactoring-scripts
2880 revision 58bb219cc090b2f4516a9297d868c245495ee622
2881
2882 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
2883 symtab_node_base to symtab_node.
2884
4d6f7dd4 28852013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
2886
2887 Implement C++14 digit separators.
2888 * c-lex.c (interpret_float): Remove digit separators from scratch string
2889 before building real literal.
2890
06cfe805 28912013-10-30 Jakub Jelinek <jakub@redhat.com>
2892
2893 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
2894
d037099f 28952013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2896
2897 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
2898 fields.
2899 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
2900 enabled.
2901 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
2902 (insert_cilk_frame): New prototype.
2903 (cilk_init_builtins): Likewise.
2904 (gimplify_cilk_spawn): Likewise.
2905 (c_cilk_install_body_w_frame_cleanup): Likewise.
2906 (cilk_detect_spawn_and_unwrap): Likewise.
2907 (cilk_set_spawn_marker): Likewise.
2908 (build_cilk_sync): Likewise.
2909 (build_cilk_spawn): Likewise.
2910 * cilk.c: New file.
2911
02774f2d 29122013-10-29 David Malcolm <dmalcolm@redhat.com>
2913
2914 Patch autogenerated by refactor_symtab.py from
2915 https://github.com/davidmalcolm/gcc-refactoring-scripts
2916 revision 58bb219cc090b2f4516a9297d868c245495ee622
2917
2918 * c-gimplify.c (c_genericize): Update for conversion of symtab types
2919 to a true class hierarchy.
2920 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
2921
31fe10fd 29222013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
2923
2924 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
2925
b1c06ff9 29262013-10-26 Jeff Law <law@redhat.com>
2927
1f78217c 2928 * c-common.c (c_define_builtins): Remove mudflap support.
2929 * c.opt: Ignore and warn for mudflap options.
b1c06ff9 2930
48a972c8 29312013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 2932
2933 PR other/33426
2934 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
2935 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
2936
546a04b1 29372013-10-23 Jason Merrill <jason@redhat.com>
2938
2939 * c-format.c (gcc_cxxdiag_char_table): Add %X.
2940
bc7bff74 29412013-10-11 Jakub Jelinek <jakub@redhat.com>
2942
d62c713e 2943 * c-common.h (omp_clause_mask::operator !=): New method.
2944 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
2945 instead of if (mask & something) tests everywhere.
2946
bc7bff74 2947 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
2948 201307 instead of 201107.
2949 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
2950 (c_common_attribute_table): Add "omp declare target" and
2951 "omp declare simd" attributes.
2952 (handle_omp_declare_target_attribute,
2953 handle_omp_declare_simd_attribute): New functions.
2954 * c-omp.c: Include c-pragma.h.
2955 (c_finish_omp_taskgroup): New function.
2956 (c_finish_omp_atomic): Add swapped argument, if true,
2957 build the operation first with rhs, lhs arguments and use NOP_EXPR
2958 build_modify_expr.
2959 (c_finish_omp_for): Add code argument, pass it down to make_code.
2960 (c_omp_split_clauses): New function.
2961 (c_split_parallel_clauses): Removed.
2962 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
2963 c_omp_declare_simd_clauses_to_decls): New functions.
2964 * c-common.h (omp_clause_mask): New type.
2965 (OMP_CLAUSE_MASK_1): Define.
2966 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
2967 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
2968 omp_clause_mask::operator |, omp_clause_mask::operator &,
2969 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
2970 omp_clause_mask::operator ==): New methods.
2971 (enum c_omp_clause_split): New.
2972 (c_finish_omp_taskgroup): New prototype.
2973 (c_finish_omp_atomic): Add swapped argument.
2974 (c_finish_omp_for): Add code argument.
2975 (c_omp_split_clauses): New prototype.
2976 (c_split_parallel_clauses): Removed.
2977 (c_omp_declare_simd_clauses_to_numbers,
2978 c_omp_declare_simd_clauses_to_decls): New prototypes.
2979 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
2980 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
2981 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
2982 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
2983 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
2984 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
2985 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
2986 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
2987 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
2988 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
2989 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
2990 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
2991 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
2992 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
2993 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
2994 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
2995 PRAGMA_OMP_CLAUSE_UNIFORM.
2996
d7dcba40 29972013-10-09 Marc Glisse <marc.glisse@inria.fr>
2998
2999 PR tree-optimization/20318
3000 * c-common.c (handle_returns_nonnull_attribute): New function.
3001 (c_common_attribute_table): Add returns_nonnull.
3002
0b7282f1 30032013-10-03 Marc Glisse <marc.glisse@inria.fr>
3004
3005 PR c++/19476
3006 * c.opt (fcheck-new): Move to common.opt.
3007
51f553af 30082013-09-25 Marek Polacek <polacek@redhat.com>
3009 Jakub Jelinek <jakub@redhat.com>
3010
3011 PR sanitizer/58413
3012 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
3013 an expression if we can prove it is correct.
3014 (ubsan_instrument_division): Likewise. Remove unnecessary
3015 check.
3016
05f893e1 30172013-09-18 Marek Polacek <polacek@redhat.com>
3018
3019 PR sanitizer/58411
3020 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
3021 Declare it.
3022 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
3023
236ce1d1 30242013-09-14 Iain Sandoe <iain@codesourcery.com>
3025
3026 PR target/48094
3027 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
3028 fobjc-gc, freplace-objc-classes): Accept for LTO.
3029
f9f68d35 30302013-09-13 Jacek Caban <jacek@codeweavers.com>
3031
3032 * c-target.def: New hook
3033
ba2f764e 30342013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
3035
3036 PR c++/43452
3037 * c.opt (Wdelete-incomplete): Add.
3038
73437615 30392013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3040
3041 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
3042 (vector_types_compatible_elements_p): New function.
3043 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
3044 declaration.
3045 (vector_types_compatible_elements_p): Declare.
3046
95af4c75 30472013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3048
3049 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
3050 a virtual member function.
3051 (pp_simple_type_specifier): Remove.
3052 (pp_c_type_specifier): Likewise.
3053 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
3054 Rename from pp_c_type_specifier. Adjust.
3055 (c_pretty_printer::c_pretty_printer): Do not assign to
3056 simple_type_specifier.
3057
eaab24b9 30582013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3059
3060 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
3061 member function.
3062 (c_pretty_printer::storage_class_specifier): Likewise.
3063 (c_pretty_printer::initializer): Likewise.
3064 (pp_declaration): Remove.
3065 (pp_declaration_specifiers): Likewise.
3066 (pp_abstract_declarator): Likewise.
3067 (pp_declarator): Likewise.
3068 (pp_type_id): Likewise.
3069 (pp_statement): Likewise.
3070 (pp_constant): Likewise.
3071 (pp_id_expression): Likewise.
3072 (pp_primary_expression): Likewise.
3073 (pp_unary_expression): Likewise.
3074 (pp_multiplicative_expression): Likewise.
3075 (pp_conditional_expression): Likewise.
3076 (pp_assignment_expression): Likewise.
3077 (pp_expression): Likewise.
3078 (pp_c_type_id): Likewise.
3079 (pp_c_storage_class_specifier): Likewise.
3080 * c-pretty-print.c (pp_c_type_cast): Tidy.
3081 (pp_c_pointer): Likewise.
3082 (pp_c_type_specifier): Likewise.
3083 (pp_c_parameter_type_list): Likewise.
3084 (pp_c_function_definition): Likewise.
3085 (pp_c_init_declarator): Likewise.
3086 (pp_c_initializer_list): Likewise.
3087 (pp_c_constructor_elts): Likewise.
3088 (c_pretty_printer::direct_abstract_declarator): Likewise.
3089 (c_pretty_printer::declaration_specifiers): Likewise.
3090 (c_pretty_printer::primary_expression): Likewise.
3091 (c_pretty_printer::postfix_expression): Likewise.
3092 (c_pretty_printer::type_id): Rename from pp_c_type_id.
3093 (c_pretty_printer::storage_class_specifier): Rename from
3094 pp_c_storage_class_specifier.
3095 (c_pretty_printer::initializer): Rename from pp_c_initializer.
3096 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
3097 storage_class_specifier, initializer, offset_list, flags.
3098
9e46467d 30992013-08-30 Marek Polacek <polacek@redhat.com>
3100
3101 * c-ubsan.c: New file.
3102 * c-ubsan.h: New file.
3103
36a8d9b9 31042013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3105
3106 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
3107 member function.
3108 (c_pretty_printer::declaration_specifiers): Likewise.
3109 (c_pretty_printer::declarator): Likewise.
3110 (c_pretty_printer::abstract_declarator): Likewise.
3111 (c_pretty_printer::direct_abstract_declarator): Likewise.
3112 (c_pretty_printer::direct_declarator): Likewise.
3113 (c_pretty_printer::function_specifier): Likewise.
3114 (pp_declaration): Adjust.
3115 (pp_declaration_specifiers): Likewise.
3116 (pp_abstract_declarator): Likewise.
3117 (pp_direct_declarator): Likewise.
3118 (pp_function_specifier): Likewise.
3119 (pp_direct_abstract_declarator): Remove as unused.
3120 (pp_c_declaration): Remove.
3121 (pp_c_declaration_specifiers): Likewise.
3122 (pp_c_declarator): Likewise.
3123 (pp_c_direct_declarator): Likewise.
3124 (pp_c_function_specifier): Likewise.
3125 (pp_c_direct_abstract_declarator): Likewise.
3126 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
3127 from pp_c_abstract_declarator. Adjust.
3128 (c_pretty_printer::direct_abstract_declarator): Rename from
3129 pp_c_direct_abstract_declarator. Adjust.
3130 (c_pretty_printer::function_specifier): Rename from
3131 pp_c_function_specifier. Adjust.
3132 (c_pretty_printer::declaration_specifiers): Rename from
3133 pp_c_declaration_specifiers. Adjust.
3134 (c_pretty_printer::direct_declarator): Rename from
3135 pp_c_direct_declarator. Adjust.
3136 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
3137 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
3138 (c_pretty_printer::c_pretty_printer): Do not assign to
3139 declaration, declaration_specifiers, declarator,
3140 direct_declarator, direct_abstract_declarator, function_specifier.
3141
30635c2e 31422013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
3143
3144 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
3145 virtual member function.
3146 (c_pretty_printer::multiplicative_expression): Likewise.
3147 (c_pretty_printer::conditional_expression): Likewise.
3148 (c_pretty_printer::assignment_expression): Likewise.
3149 (c_pretty_printer::expression): Likewise.
3150 (pp_unary_expression): Adjust.
3151 (pp_multiplicative_expression): Likewise.
3152 (pp_assignment_expression): Likewise.
3153 (pp_conditional_expression): Likewise.
3154 (pp_expression): Likewise.
3155 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
3156 from pp_c_unary_expression. Adjust.
3157 (c_pretty_printer::multiplicative_expression): Rename from
3158 pp_c_multiplicative_expression. Adjust.
3159 (c_pretty_printer::conditional_expression): Rename from
3160 pp_c_conditional_expression. Adjust.
3161 (c_pretty_printer::assignment_expression): Rename from
3162 pp_c_assignment_expression. Adjust.
3163 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
3164 (c_pretty_printer::c_pretty_printer): Do not assign to
3165 unary_expression, multiplicative_expression,
3166 conditional_expression, expression.
3167
027d08ed 31682013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
3169
3170 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
3171 virtual member function.
3172 (pp_postfix_expression): Adjust.
3173 (pp_c_postfix_expression): Remove.
3174 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
3175 from pp_c_postfix_expression. Adjust.
3176 (c_pretty_printer::c_pretty_printer): Do not assign to
3177 postfix_expression.
3178
f873303a 31792013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
3180
3181 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
3182 virtua member function.
3183 (pp_primary_expression): Adjust.
3184 (pp_c_primary_expression): Remove.
3185 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
3186 from pp_c_primary_expression. Adjust.
3187 (pp_c_initializer_list): Use pp_primary_expression.
3188 (c_pretty_printer::c_pretty_printer): Do not assign to
3189 primary_expression.
3190
08e3e481 31912013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
3192
3193 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
3194 * c-pretty-print.c (M_): Remove.
3195 (c_pretty_printer::translate_string): Define.
3196 (pp_c_type_specifier): Use it.
3197 (pp_c_primary_expression): Likewise.
3198 (pp_c_expression): Likewise.
3199
1fc4a87f 32002013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
3201
3202 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
3203 virtual function.
3204 (pp_c_id_expression): Remove.
3205 (pp_id_expression): Adjust.
3206 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
3207 pp_c_id_expression. Adjust.
3208 (pp_c_postfix_expression): Use pp_id_expression.
3209 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
3210
a6cb161b 32112013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
3212
3213 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
3214 member function.
3215 (pp_constant): Adjust.
3216 (pp_c_constant): Remove.
3217 * c-pretty-print.c (c_pretty_printer::constant): Rename from
3218 pp_c_constant. Adjust.
3219 (pp_c_constant)
3220 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
3221 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
3222
eed6bc21 32232013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3224
3225 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
3226 (c_pretty_printer::c_pretty_printer): Declare.
3227 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
3228 c_pretty_printer_init. Adjust.
3229 (print_c_tree): Do not call c_pretty_printer_init.
3230 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
3231
df558d2e 32322013-08-09 Arnaud Charlet <charlet@adacore.com>
3233
3234 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
3235
42f9a786 32362013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
3237
3238 PR c++/58080
3239 * c-common.c (pointer_int_sum): Add bool parameter.
3240 * c-common.h (pointer_int_sum): Adjust declaration.
3241
f874ddad 32422013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
3243
3244 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
3245 c_pretty_printer variable.
3246
a94db6b0 32472013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3248
3249 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
3250 (pp_base): Remove.
3251 (pp_c_base): Likewise. Adjust users.
3252 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
3253 (pp_c_whitespace): Do not call pp_base.
3254 (pp_c_left_paren): Likewise.
3255 (pp_c_right_paren): Likewise.
3256 (pp_c_left_brace): Likewise.
3257 (pp_c_right_brace): Likewise.
3258 (pp_c_left_bracket): Likewise.
3259 (pp_c_right_bracket): Likewise.
3260 (pp_c_dot): Likewise.
3261 (pp_c_ampersand): Likewise.
3262 (pp_c_star): Likewise.
3263 (pp_c_arrow): Likewise.
3264 (pp_c_semicolon): Likewise.
3265 (pp_c_complement): Likewise.
3266 (pp_c_exclamation): Likewise.
3267 (pp_c_direct_declarator): Likewise.
3268 (pp_c_ws_string): Likewise.
3269 (pp_c_identifier): Likewise.
3270 (pp_c_statement): Likewise.
3271 (print_c_tree): Likewise.
3272
1898176c 32732013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
3274
3275 PR c++/58072
3276 * c-common.c (c_parse_error): Catch user-defined literal tokens and
3277 provide useful error strings.
3278
70d60d1d 32792013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3280
3281 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
3282 printer functions instead of pp_string or operators and punctuators.
3283 (dump_generic_ada_node): Likewise.
3284 * c-pretty-print.c (pp_c_type_specifier): Likewise.
3285 (pp_c_relational_expression): Likewise.
3286 (pp_c_logical_or_expression): Likewise.
3287
dda4f0ec 32882013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3289
3290 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
3291 functions instead of pp_character.
3292 (pp_ada_tree_identifier): Likewise.
3293 (dump_ada_double_name): Likewise.
3294 (dump_ada_function_declaration): Likewise.
3295 (dump_ada_array_domains): Likewise.
3296 (dump_template_types): Likewise.
3297 (dump_generic_ada_node): Likewise.
3298 (print_ada_declaration): Likewise.
3299 (print_ada_struct_decl): Likewise.
3300 * c-pretty-print.c (pp_c_integer_constant): Likewise.
3301
7aa04c8d 33022013-07-23 Tom Tromey <tromey@redhat.com>
3303
3304 * c-common.h (enum rid) <RID_GENERIC>: New constant.
3305 * c-common.c (c_common_reswords): Add _Generic.
3306
a04e8d62 33072013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
3308
3309 * c-common.c: Fix typos.
3310 * c-common.h: Likewise.
3311
a96c3cc1 33122013-07-13 Lubos Lunak <l.lunak@suse.cz>
3313
3314 PR c++/55203
3315 * c-common.c (c_common_attribute_table): Add warn_unused.
3316 (handle_warn_unused_attribute): New.
3317
da31536d 33182013-07-10 Jakub Jelinek <jakub@redhat.com>
3319
3320 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
3321 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
3322
839f2f70 33232013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
3324
3325 PR c++/57869
3326 * c.opt: Add Wconditionally-supported.
3327
73f353d0 33282013-07-08 Graham Stott <graham.stott@btinternet.com>
3329
1f78217c 3330 * array-notation-common.c (length_mismatch_in_expr_p): Delete
73f353d0 3331 unused variables l_length and l_node.
3332
21ebaa24 33332013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 3334
3335 PR c/57821
3336 * c-common.c (complete_array_type): Delay folding first index
3337 like other indices. When folding, check for index overflow.
3338
68ea4406 33392013-06-27 Marc Glisse <marc.glisse@inria.fr>
3340
3341 PR c++/57509
3342 * c-common.h (c_build_vec_perm_expr): New complain argument.
3343 * c-common.c (c_build_vec_perm_expr): Likewise.
3344 Use save_expr also in C++.
3345
60777f69 33462013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3347
3348 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
3349 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
3350 * c-opts.c (c_common_post_options): Likewise.
3351
839f2f70 33522013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
50acebe0 3353
3354 * array-notation-common.c (length_mismatch_in_expr): Changed the
3355 parameter type's from a dynamic array to a vec_tree. Also removed
3356 the size parameters.
3357 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
3358 the change above.
3359
e9331eab 33602013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3361
3362 * c-common.h (struct cilkplus_an_parts): New structure.
3363 (struct cilkplus_an_loop_parts): Likewise.
3364 (cilkplus_extract_an_triplets): New prototype.
3365 (fix_sec_implicit_args): Likewise.
3366 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
3367 (fix_sec_implicit_args): Likewise.
60777f69 3368
a9c99fc4 33692013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
3370
3371 * array-notation-common.c (find_inv_trees): Removed an unwanted
3372 typecasting.
3373 * c-common.h (struct inv_list::additional_tcodes): Changed type from
3374 enum rid to enum tree_code.
3375
f2526cce 33762013-06-11 Jan Hubicka <jh@suse.cz>
3377
3378 * c-common.c (handle_alias_ifunc_attribute): Do not set
3379 DECL_EXTERNAL for weakref variables.
3380 * c-pragma.c (handle_pragma_weak): Make sure aliases
3381 are not declared as external.
3382
09970d67 33832013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3384
3385 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
3386 function from c/c-array-notation.c.
3387 (is_cilkplus_reduce_builtin): Likewise.
3388 (find_rank): Likewise.
3389 (extract_array_notation_exprs): Likewise.
3390 (replace_array_notations): Likewise.
3391 (find_inv_trees): Likewise.
3392 (replace_inv_trees): Likewise.
3393 (contains_array_notation_expr): Likewise.
3394 (find_correct_array_notation_type): Likewise.
3395 * c-common.h (struct inv_list): Moved this struct from the file
3396 c/c-array-notation.c and added a new field called additional tcodes.
3397 (length_mismatch_in_expr_p): New prototype.
3398 (is_cilkplus_reduce_builtin): Likewise.
3399 (find_rank): Likewise.
3400 (extract_array_notation_exprs): Likewise.
3401 (replace_array_notation): Likewise.
3402 (find_inv_trees): Likewise.
3403 (replace_inv_trees): Likewise.
3404 (find_correct_array_notation_type): Likewise.
839f2f70 3405
3c6d4197 34062013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3407
3408 * c-common.c (c_define_builtins): When cilkplus is enabled, the
3409 function array_notation_init_builtins is called.
3410 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
3411 * c-common.def (ARRAY_NOTATION_REF): New tree.
3412 * c-common.h (build_array_notation_expr): New function declaration.
3413 (build_array_notation_ref): Likewise.
3414 (extract_sec_implicit_index_arg): New extern declaration.
3415 (is_sec_implicit_index_fn): Likewise.
3416 (ARRAY_NOTATION_CHECK): New define.
3417 (ARRAY_NOTATION_ARRAY): Likewise.
3418 (ARRAY_NOTATION_START): Likewise.
3419 (ARRAY_NOTATION_LENGTH): Likewise.
3420 (ARRAY_NOTATION_STRIDE): Likewise.
3421 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
3422 ARRAY_NOTATION_REF.
3423 (pp_c_expression): Likewise.
3424 * c.opt (flag_enable_cilkplus): New flag.
3425 * array-notation-common.c: New file.
3426
8e71dad2 34272013-05-14 Jakub Jelinek <jakub@redhat.com>
3428
3429 PR c++/57274
3430 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
3431
432dd330 34322013-05-10 Marc Glisse <marc.glisse@inria.fr>
3433
3434 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
3435 vectors.
3436
b156ec37 34372013-05-07 Han Shen <shenhan@google.com>
3438
3439 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
3440
1a087624 34412013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3442
3443 * c-common.c (check_user_alignment): Emit error for negative values.
3444
1638c736 34452013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3446
3447 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
3448
949dbf93 34492013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3450
3451 * c-cppbuiltin.c (c_cpp_builtins): Do not define
3452 __GXX_EXPERIMENTAL_CXX1Y__.
3453
9205a6cc 34542013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3455 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3456
3457 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
3458 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
3459 to simply use OPT_Wpointer_arith.
3460 (c_sizeof_or_alignof_type): Likewise.
3461
05d0bce1 34622013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3463
3464 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
3465
41609f8b 34662013-04-12 Jakub Jelinek <jakub@redhat.com>
3467
3468 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
3469 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
3470 specifiers.
3471
c671dc4f 34722013-04-07 Steven Bosscher <steven@gcc.gnu.org>
3473
3474 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
3475
ba125576 34762013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
3477
3478 * c-common.c (pointer_int_sum): Remove dead code.
3479
9d3fa937 34802013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
3481
3482 PR middle-end/56524
3483 * c-common.c (handle_optimize_attribute): Don't call
3484 save_optabs_if_changed.
3485
5ceebb21 34862013-03-05 Jakub Jelinek <jakub@redhat.com>
3487
3488 PR middle-end/56461
3489 * c-pch.c (pch_init): Free target_validity at the end.
3490
18eeed2b 34912013-03-04 Jakub Jelinek <jakub@redhat.com>
3492
3493 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
3494
a9196da9 34952013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
3496 Jakub Jelinek <jakub@redhat.com>
3497
3498 PR sanitizer/56454
3499 * c-common.c (handle_no_sanitize_address_attribute): New function.
3500 (c_common_attribute_table): Add no_sanitize_address attribute.
3501 (handle_no_address_safety_analysis_attribute): Add
3502 no_sanitize_address attribute, not no_address_safety_analysis
3503 attribute.
3504
15c27dda 35052013-02-18 Aldy Hernandez <aldyh@redhat.com>
08c7d04b 3506
3507 PR target/52555
3508 * c-common.c (handle_optimize_attribute): Call
3509 save_optabs_if_changed.
3510
19426fe1 35112013-02-18 Jakub Jelinek <jakub@redhat.com>
3512 Steven Bosscher <steven@gcc.gnu.org>
3513
3514 PR pch/54117
3515 * c-opts.c (c_common_post_options): If debug info is enabled
3516 and non-dwarf*, refuse to load PCH files and when writing PCH
3517 file warn.
3518
df936998 35192013-02-05 Jakub Jelinek <jakub@redhat.com>
3520
3521 PR middle-end/56167
3522 * c-common.c (handle_error_attribute): Fix condition.
3523
ae0c3984 35242013-01-30 Jakub Jelinek <jakub@redhat.com>
3525
3526 PR c++/55742
3527 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
3528
1c4973d7 35292013-01-18 Jason Merrill <jason@redhat.com>
3530
3531 PR target/54908
3532 * c.opt (-fextern-tls-init): New.
3533 * c-opts.c (c_common_post_options): Handle it.
3534
7c834436 35352013-01-09 Jakub Jelinek <jakub@redhat.com>
3536
3537 PR c/48418
3538 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
3539 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
3540 and is either negative or bigger or equal to type precision
3541 of the first operand.
3542
5abaa10a 35432012-12-03 Marek Polacek <polacek@redhat.com>
3544
3545 PR c/55570
3546 * c-common.c (check_user_alignment): Swap order of tests,
3547 check TREE_CODE first.
3548
324ca377 35492012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
3550
3551 PR c++/52654
3552 * c-common.h (overflow_type): New enum.
3553 (build_userdef_literal): Add overflow_type argument.
3554 (tree_userdef_literal): Add overflow_type.
3555 (USERDEF_LITERAL_OVERFLOW): New access macro.
3556 * c-common.c (build_userdef_literal): Add overflow_type
3557 argument.
3558 * c-lex.c (c_lex_with_flags): Add overflow_type to
3559 build_userdef_literal calls.
3560 (interpret_integer, interpret_float): Add overflow_type argument.
3561
b4c4a429 35622012-11-28 Richard Biener <rguenther@suse.de>
3563
3564 PR c/35634
3565 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
3566 here and use a type with proper overflow behavior for types that would
3567 need to be promoted for the arithmetic.
3568
d413ffdd 35692012-11-23 Jakub Jelinek <jakub@redhat.com>
3570
3571 PR sanitizer/55435
3572 * c-common.c (handle_no_address_safety_analysis_attribute): New
3573 function.
3574 (c_common_attribute_table): Add no_address_safety_analysis.
3575
52bc861d 35762012-11-16 Simon Baldwin <simonb@google.com>
3577
3578 * c.opt: Add f[no-]canonical-system-headers.
3579 * c-opts.c (c_common_handle_option): Handle
3580 OPT_fcanonical_system_headers.
3581
2dd00636 35822012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
3583
3584 PR c++/54413
3585 * c-opts.c (c_common_handle_option): Set new flags.
3586 * c.opt: Describe new flags.
3587
d4701f6c 35882012-11-09 Jason Merrill <jason@redhat.com>
3589
3590 * c.opt (Wabi-tag): New.
3591
72d65da9 35922012-11-09 Andi Kleen <ak@linux.intel.com>
3593
3594 PR 55139
3595 * c-common.c (get_atomic_generic_size): Mask with
3596 MEMMODEL_MASK
3597
77a357e3 35982012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
3599
3600 PR c/53063
3601 * c.opt (Wformat): Make it Alias Wformat=1.
3602 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
3603 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
3604 LangEnabledBy.
3605 (Wformat=): RejectNegative. Use LangEnabledBy.
3606 (Wnonnull): Use LangEnabledBy.
3607 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
3608 * c-format.c (set_Wformat): Delete.
3609 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
3610 (maybe_read_dollar_number): Likewise.
3611 (avoid_dollar_number): Likewise.
3612 (finish_dollar_format_checking): Likewise.
3613 (check_format_info): Likewise.
3614 (check_format_info_main): Likewise.
3615 (check_format_types): Likewise.
3616 (format_type_warning): Likewise.
3617 * c-common.c (int): Likewise.
3618 (check_function_sentinel): Likewise.
3619 * c-common.h (warn_format,set_Wformat): Do not declare here.
3620
45efa6b9 36212012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
3622
3623 PR c/53063
3624 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
3625 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
3626 Use LangEnabledBy.
3627 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
3628 common.opt.
3629 (Wvariadic-macros): Init(1).
3630 * c-opts.c (c_common_handle_option): Do not handle them
3631 explicitly.
3632 (c_common_post_options): Likewise.
3633 (sanitize_cpp_opts): warn_unused_macros is now
3634 cpp_warn_unused_macros.
3635 (push_command_line_include): Likewise.
3636 * c-common.c (warn_unknown_pragmas): Do not define.
3637 * c-common.h (warn_unknown_pragmas): Do not declare.
3638
0e4e775a 36392012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
3640
3641 PR c/51294
3642 * c-common.c (conversion_warning): Handle conditional expressions.
3643
8b447d3f 36442012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3645
3646 PR c++/54930
3647 * c.opt (Wreturn_local_addr): Define new option.
3648
f4a61754 36492012-10-25 Jason Merrill <jason@redhat.com>
3650
ecb10e6a 3651 * c.opt (Wvirtual-move-assign): New.
3652
f4a61754 3653 * c.opt (Winherited-variadic-ctor): New.
3654
7b463b19 36552012-10-25 Marc Glisse <marc.glisse@inria.fr>
3656
3657 PR c++/54427
3658 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
3659
6adc88f8 36602012-10-23 Joseph Myers <joseph@codesourcery.com>
3661
3662 * c-common.h (pch_cpp_save_state): Declare.
3663 * c-target.def (c_preinclude): New hook.
3664 * c-opts.c (done_preinclude): New.
3665 (push_command_line_include): Handle default preincluded header.
3666 (cb_file_change): Call pch_cpp_save_state when calling
3667 push_command_line_include.
3668 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
3669 (pch_cpp_save_state): New.
3670 (pch_init): Call pch_cpp_save_state conditionally, instead of
3671 calling cpp_save_state.
3672
fa816b0b 36732012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
3674
3675 PR c/53063
3676 PR c/40989
3677 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
3678 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
3679 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
3680 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
3681 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
3682 * c-opts.c (c_common_handle_option): Remove explicit handling from
3683 here.
3684 (c_common_post_options): Likewise.
3685
d214ccee 36862012-10-18 Eric Botcazou <ebotcazou@adacore.com>
3687
3688 * c-ada-spec.c (LOCATION_COL): Delete.
3689 (compare_location): New function.
3690 (compare_node): Use it.
3691 (compare_comment): Likewise.
3692
77b27208 36932012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3694
3695 PR c/53063
3696 PR c/40989
3697 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
3698 * c-opts.c (c_common_handle_option): Do not set them here. Add
3699 comment.
3700 (c_common_post_options): Likewise.
3701
cc02ca4d 37022012-10-16 Eric Botcazou <ebotcazou@adacore.com>
3703
3704 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
3705 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
3706 Remove POINTER_TYPE handling, add large unsigned handling and use
3707 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
3708
57f872a2 37092012-10-12 Jakub Jelinek <jakub@redhat.com>
3710
3711 PR c/54381
3712 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
3713 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
3714 locs and array of 3 trees instead of just single loc and single
3715 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
3716 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
3717 For *cmp* builtins that take two sources strings report warnings
3718 about first and second source, not about destination and source.
3719
7354ad2e 37202012-10-12 Marc Glisse <marc.glisse@inria.fr>
3721
3722 PR c++/53055
3723 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
3724
1ac7f120 37252012-10-11 Eric Botcazou <ebotcazou@adacore.com>
3726
3727 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
3728 declaring something coming from another file.
3729
1e0cc9e3 37302012-10-10 Arnaud Charlet <charlet@adacore.com>
3731
1ac7f120 3732 PR ada/54845
1e0cc9e3 3733 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
3734
b0e7825e 37352012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3736
3737 PR c++/54194
3738 * c-common.c (warn_about_parentheses): Add location_t parameter;
3739 use EXPR_LOC_OR_LOC.
3740 * c-common.h: Update declaration.
3741
41ed701a 37422012-10-09 Marc Glisse <marc.glisse@inria.fr>
3743
3744 PR c++/54427
3745 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
3746 more operations. Make error messages optional.
3747 * c-common.h (enum stv_conv): Moved from c-typeck.c.
3748 (scalar_to_vector): Declare.
3749
3740094c 37502012-10-08 Jason Merrill <jason@redhat.com>
3751
3752 * c-common.c (c_common_reswords): Add thread_local.
3753
ffcdbf9c 37542012-10-08 Dodji Seketeli <dodji@redhat.com>
3755
3756 PR c++/53528 C++11 attribute support
3757 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
3758 new functions.
3759 * c-common.c (check_cxx_fundamental_alignment_constraints): New
3760 static function.
3761 (handle_aligned_attribute): In choose strictest alignment
3762 among many. Use new check_cxx_fundamental_alignment_constraints.
3763 (handle_transparent_union_attribute): In c++11 attribute syntax,
3764 don't look through typedefs.
3765
ef34afc1 37662012-10-04 Arnaud Charlet <charlet@adacore.com>
3767
3768 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
3769 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
3770 out of dumpfile.h.
3771
f1ff4562 37722012-09-25 Dehao Chen <dehao@google.com>
3773
3774 PR middle-end/54645
ef34afc1 3775 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
f1ff4562 3776 map when read in the pch.
3777
735538a1 37782012-09-18 Arnaud Charlet <charlet@adacore.com>
3779
3780 * c-ada-spec.c: Style fixes.
3781
9120cdc8 37822012-09-18 Thomas Quinot <quinot@adacore.com>
3783
3784 * c.opt (-fada-spec-parent): Define new command line switch.
3785 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
3786 is specified, generate binding spec as a child of the specified unit.
3787
8eba82c2 37882012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
3789 Manuel López-Ibáñez <manu@gcc.gnu.org>
3790
3791 PR c++/53210
3792 * c.opt ([Winit-self]): Enabled by -Wall in C++.
3793
38682990 37942012-08-23 Arnaud Charlet <charlet@adacore.com>
3795
3796 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
3797 for pointers, and add missing Convention C pragma.
3798 (print_ada_struct_decl): Add missing aliased keyword.
3799 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
3800
f003f5dc 38012012-08-17 Jakub Jelinek <jakub@redhat.com>
3802
3803 * c-common.c (sizeof_pointer_memaccess_warning): New function.
3804 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
3805 * c-opts.c (c_common_handle_option): Enable it for -Wall.
3806 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
3807 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
3808
ec11736b 38092012-08-10 Richard Guenther <rguenther@suse.de>
3810
3811 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
3812
5f7f600e 38132012-08-07 Steven Bosscher <steven@gcc.gnu.org>
3814
3815 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
3816 instead of separate pp_newline and pp_flush.
3817 (print_c_tree): Likewise.
3818
758a38ab 38192012-07-26 Richard Henderson <rth@redhat.com>
3820
3821 * c-common.c (handle_hot_attribute): Allow labels.
3822 (handle_cold_attribute): Likewise.
3823
9ca77b08 38242012-07-20 Jakub Jelinek <jakub@redhat.com>
3825
3826 PR c++/28656
3827 * c-common.c (check_function_nonnull): Handle multiple nonnull
3828 attributes properly.
3829
b9ed1410 38302012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3831
3832 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
3833 * c-ada-spec.c: Likewise.
3834 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
3835
c2a65b90 38362012-07-14 Steven Bosscher <steven@gcc.gnu.org>
3837
3838 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
3839 Remove code conditional on it.
3840
88c5a1d1 38412012-07-11 Steven Bosscher <steven@gcc.gnu.org>
3842
3843 * c-gimplify.c: Do not include basic-block.h.
3844 * c-common.c: Do not include linfuncs.h.
3845
4a020a8c 38462012-07-08 Steven Bosscher <steven@gcc.gnu.org>
3847
3848 * c-common.h: Include tree.h.
3849
c28ddc97 38502012-07-02 Jason Merrill <jason@redhat.com>
3851
3852 PR c++/53524
3853 * c-common.c (get_priority): Call default_conversion.
3854
405ed67f 38552012-07-01 Uros Bizjak <ubizjak@gmail.com>
3856
3857 * c-pch.c (c_common_write_pch): Remove unused variables.
3858
e53d55e7 38592012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3860
3861 * cppspec.c: Moved from gcc/ to here.
3862
3d9c25ec 38632012-06-27 Kai Tietz <ktietz@redhat.com>
3864
3865 PR preprocessor/37215
3866 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
3867
3169c57a 38682012-06-21 Steven Bosscher <steven@gcc.gnu.org>
3869
3870 * c-common.h (c_common_print_pch_checksum): Remove.
3871 * c-pch.c: Do not include output.h.
3872 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
3873 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
3874 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
3875 (struct c_pch_header): Remove.
3876 (get_ident): Update gpch version.
3877 (pch_init): Do not print executable_checksum to asm_out_file.
3878 Do not fail if there is no asm_out_file to read back from. Set
3879 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
3880 (c_common_write_pch): Verify that nothing was written to asm_out_file
3881 since pch_init was called. Do not write a c_pch_header, and do not
3882 copy from asm_out_file to the PCH.
3883 (c_common_read_pch): Do not read a c_pch_header, and do not restore
3884 the content of asm_out_file from the PCH.
3885 (c_common_print_pch_checksum): Remove.
3886 * c-opts.c (c_common_init): Print out executable_checksum directly.
3887
ff6624bc 38882012-06-19 Steven Bosscher <steven@gcc.gnu.org>
3889
3890 * c-target.def (objc_declare_unresolved_class_reference,
3891 objc_declare_class_definition): Add new hooks.
3892
367b1459 38932012-06-19 Steven Bosscher <steven@gcc.gnu.org>
3894
3895 * c-lex.c: Do not include output.h.
3896 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
3897 Remove uses of ASM_OUTPUT_IDENT.
3898
bf0cb017 38992012-06-15 Marc Glisse <marc.glisse@inria.fr>
3900
3901 PR c++/51033
3902 * c-common.h (c_build_vec_perm_expr): Move decl here.
3903 * c-common.c (c_build_vec_perm_expr): Move definition
3904 here.
3905
b37a3600 39062012-06-06 Steven Bosscher <steven@gcc.gnu.org>
3907
3908 * c.opt (fconserve-space): Turn into a no-op.
3909
19931eea 39102012-06-04 Sterling Augustine <saugustine@google.com>
5f9e7dd5 3911
3912 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
3913 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
3914 both the start and end of the function.
3915
dff12c10 39162012-06-04 Steven Bosscher <steven@gcc.gnu.org>
3917
3918 * c-common.c: Do not include output.h.
3919 * c-pragma.c: Likewise.
3920
5f9e7dd5 39212012-06-04 Steven Bosscher <steven@gcc.gnu.org>
3922
3923 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
3924 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
3925 (lang_decl_name): Handle namespace decls.
3926
b5369b7d 39272012-05-31 Steven Bosscher <steven@gcc.gnu.org>
3928
3929 * c-ada-spec.c: Do not include output.h.
3930 * c-semantics.c: Likewise.
3931
8032877c 39322012-05-29 Joseph Myers <joseph@codesourcery.com>
3933
3934 * c-common.c: Fix typo.
3935
7843e4bc 39362012-05-29 Michael Matz <matz@suse.de>
3937
3938 * c-common.h (c_expand_decl): Remove prototype.
3939
8cf857d4 39402012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3941
3942 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
3943 * c-opts.c (c_common_handle_option): Remove code handling
3944 warn_missing_braces.
3945
8b64dc3c 39462012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
3947
3948 PR c++/25137
3949 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
3950 -Wmissing_braces.
3951
43cbde16 39522012-05-22 Dodji Seketeli <dodji@redhat.com>
3953
3954 PR c++/53322
3955 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
3956
db490cb6 39572012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
3958
3959 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
3960 * c-opts.c (c_common_handle_option): Do not handle explicitly
3961 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
3962
a60f3e81 39632012-05-16 Dodji Seketeli <dodji@redhat.com>
3964
3965 PR preprocessor/7263
3966 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
3967 to cpp_classify_number. For diagnostics, use the precise location
3968 instead of the global input_location.
3969
82e6ef7c 39702012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
3971
cd4797ff 3972 PR c++/11856
82e6ef7c 3973 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
3974
258a168d 39752012-05-14 Bernd Schmidt <bernds@codesourcery.com>
3976
82e6ef7c 3977 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
258a168d 3978
d3b7ee7c 39792012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
3980
3981 PR 53063
3982 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
3983 Wreorder): Use LangEnabledBy.
3984 * c-opts.c (c_common_handle_option): Do not enable them
3985 explicitly. Call lang-specific generated functions.
3986 (c_common_post_options): Do not set them here.
3987
70059cea 39882012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
3989
3990 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
3991 Wmissing-field-initializers,Wmissing-parameter-type,
3992 Wold-style-declaration,Woverride-init): Use EnabledBy.
3993 * c-opts.c (c_common_post_options): Do not set here explicitly.
3994
fbb6fbd8 39952012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
3996
3997 PR 53063
3998 * c-opts.c (c_common_handle_option): Use handle_generated_option
3999 to enable sub-options.
4000
61f69bc9 40012012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
4002
4003 PR c++/53158
4004 * c-common.c (warnings_for_convert_and_check): Use warning_at.
4005
5a1fe2db 40062012-05-10 Richard Guenther <rguenther@suse.de>
4007
4008 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
4009 adjust commentary about TYPE_IS_SIZETYPE types.
4010
d42e7c5a 40112012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4012
4013 PR c++/53261
4014 * c-common.c (warn_logical_operator): Check that argument of
4015 integer_zerop is not NULL.
4016
686369e8 40172012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
4018
4019 PR c/43772
4020 * c-common.c (warn_logical_operator): Do not warn if either side
4021 is already true or false.
4022
03fe1dc2 40232012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
4024
4025 PR c/51712
4026 * c-common.c (expr_original_type): New.
4027 (shorten_compare): Do not warn for enumeration types.
4028
bba5a206 40292012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
4030
4031 * c.opt (fpermissive): Add Var(flag_permissive).
4032
7059d45d 40332012-04-30 Marc Glisse <marc.glisse@inria.fr>
4034
4035 PR c++/51033
4036 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
4037 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
4038
7edb1062 40392012-04-30 Dodji Seketeli <dodji@redhat.com>
4040
4041 Add -Wvarargs option
4042 * c.opt (Wvarargs): Define new option.
4043
068bea1e 40442012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
4045
4046 * c-common.c (check_function_arguments): Replace
4047 Wmissing-format-attribute with Wsuggest-attribute=format.
4048
b86527d8 40492012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
4050
4051 * c.opt (Wsuggest-attribute=format): New. Alias of
4052 Wmissing-format-attribute.
4053 * c-format.c (decode_format_type): Replace
4054 Wmissing-format-attribute with Wsuggest-attribute=format.
4055 (check_function_format): Likewise.
4056
19931eea 40572012-04-27 Ollie Wild <aaw@google.com>
76d340ac 4058
4059 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
4060 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
4061 * c.opt: Add Wliteral-suffix.
4062
29438999 40632012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
4064
4065 PR c/44774
4066 * c.opt (Wpedantic): New.
4067 (pedantic): Alias Wpedantic.
4068 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
4069 (c_common_post_options): Likewise.
4070 (sanitize_cpp_opts): Likewise.
4071 * c-lex.c (interpret_float): Likewise.
4072 * c-format.c (check_format_types): Likewise.
4073 * c-common.c (pointer_int_sum): Likewise.
4074 (c_sizeof_or_alignof_type): Likewise.
4075 (c_add_case_label): Likewise.
4076 (c_do_switch_warnings): Likewise.
4077 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
4078
4f9d6b8b 40792012-04-15 Jason Merrill <jason@redhat.com>
4080
4081 PR c++/52818
4082 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
4083 (C_STD_NAME): Distinguish between C++98 and C++11.
4084
74bdbe96 40852012-04-11 Eric Botcazou <ebotcazou@adacore.com>
4086
4087 PR target/52624
4088 * c-common.h (uint16_type_node): Rename into...
4089 (c_uint16_type_node): ...this.
4090 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
4091 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
4092
3d177e8c 40932012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
4094
4095 * c-common.c (warn_if_unused_value): Move definition to here.
4096 * c-common.h (warn_if_unused_value): Move declaration to here.
4097
6a9a958f 40982012-03-23 William Bader <williambader@hotmail.com>
4099
4100 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
4101
543efdbe 41022012-03-20 Jason Merrill <jason@redhat.com>
4103
4104 * c-common.h (enum cxx_dialect): Add cxx1y.
4105 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
4106 test.
4107 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
4108 * c-opts.c (c_common_post_options): Likewise.
4109 (set_std_cxx1y): New.
4110 (c_common_handle_option): Call it.
4111 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
4112
62206d34 41132012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
4114
4115 PR c++/14710
4116 * c.opt ([Wuseless-cast]): Add.
4117
fadf62f4 41182012-03-16 Richard Guenther <rguenther@suse.de>
4119
4120 * c-pretty-print.c (pp_c_initializer_list): Adjust.
4121
249faa35 41222012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
4123
4124 PR c++/44783
4125 * c.opt (ftemplate-backtrace-limit) Add.
4126
126b6848 41272012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4128
4129 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
4130 handling.
4131 * c-pragma.c (handle_pragma_extern_prefix): Remove.
4132 (init_pragma): Don't register extern_prefix.
4133
a51edb4c 41342012-03-12 Richard Guenther <rguenther@suse.de>
4135
4136 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
4137 (builtin_type_for_size): Likewise.
4138
0f6a7cb7 41392012-02-13 Jakub Jelinek <jakub@redhat.com>
4140
4141 PR c++/52215
4142 * c-common.c (sync_resolve_params): Don't decide whether to convert
4143 or not based on TYPE_SIZE comparison, convert whenever arg_type
4144 is unsigned INTEGER_TYPE.
4145
0779e32c 41462012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
4147
4148 PR c/52118
4149 * c.opt ([Wunused-local-typedefs]): Fix description.
4150
baec58e1 41512012-01-24 Mike Stump <mikestump@comcast.net>
4152
4153 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
4154 exactly.
4155
c779d8cc 41562012-01-18 Richard Guenther <rguenther@suse.de>
4157
4158 * c-opts.c (c_common_post_options): Reset LTO flags if
4159 we are about to generate a PCH.
4160
ee917d24 41612012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
4162
4163 PR c++/51777
4164 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
4165 use pp_unsigned_wide_integer.
4166
90e2341f 41672012-01-10 Richard Guenther <rguenther@suse.de>
4168
4169 PR middle-end/51806
4170 * c-opts.c (c_common_handle_option): Move -Werror handling
4171 to language independent code.
4172
9ea022ce 41732012-01-05 Richard Guenther <rguenther@suse.de>
4174
4175 PR middle-end/51764
4176 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
4177 from common.opt.
4178
3df19e1b 41792011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
4180
4181 PR c++/51316
4182 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
4183 of array types with an unknown bound.
4184
32074525 41852011-12-20 Joseph Myers <joseph@codesourcery.com>
4186
4187 * c-common.c (flag_isoc99): Update comment to refer to C11.
4188 (flag_isoc1x): Change to flag_isoc11.
4189 * c-common.h (flag_isoc99): Update comment to refer to C11.
4190 (flag_isoc1x): Change to flag_isoc11.
4191 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
4192 C11.
4193 * c-opts.c (set_std_c1x): Change to set_std_c11.
4194 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
4195 Call set_std_c11.
4196 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
4197 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
4198 * c.opt (std=c1x): Change to std=c11. Document as non-draft
4199 standard.
4200 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
4201 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
4202 (std=gnu1x): Make alias of std=gnu11.
4203
fca86134 42042011-12-19 Jason Merrill <jason@redhat.com>
4205
4206 PR c++/51228
4207 * c-common.c (handle_transparent_union_attribute): Check the first
4208 field if the type is complete.
4209
aa4313eb 42102011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
4211
4212 PR libstdc++/51365
4213 * c-common.c (RID_IS_FINAL): Add.
4214 * c-common.h (RID_IS_FINAL): Add.
4215
3f3d5ad4 42162011-11-30 Iain Sandoe <iains@gcc.gnu.org>
4217
4218 * c.opt (fgnu-runtime): Provide full description.
4219 (fnext-runtime): Likewise.
4220 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
4221
c4606d19 42222011-11-28 Andrew MacLeod <amacleod@redhat.com>
4223
4224 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
4225 predefines in one place. Add LOCK_FREE predefines.
4226 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
4227 new func.
4228
1d581089 42292011-11-24 Andrew MacLeod <amacleod@redhat.com>
4230
4231 PR c/51256
19931eea 4232 * c-common.c (get_atomic_generic_size): Check for various error
1d581089 4233 conditions
19931eea 4234 (resolve_overloaded_atomic_exchange,
4235 resolve_overloaded_atomic_compare_exchange,
1d581089 4236 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
4237 error_mark_node for error conditions.
19931eea 4238
6aa221fa 42392011-11-08 Richard Guenther <rguenther@suse.de>
4240
4241 PR middle-end/51010
4242 c-family/
4243
4c0315d0 42442011-11-07 Richard Henderson <rth@redhat.com>
4245 Aldy Hernandez <aldyh@redhat.com>
4246 Torvald Riegel <triegel@redhat.com>
4247
4248 Merged from transactional-memory.
4249
4250 * c-common.c (handle_tm_wrap_attribute,
4251 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
4252 (struct c_common_reswords): Added __transaction* keywords.
4253 (struct c_common_attribute_table): Added transaction* and tm_regparm
4254 attributes.
4255 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
4256 masks.
4257 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
4258 find_tm_attribute): Declare.
4259
920f5a70 42602011-11-07 Jason Merrill <jason@redhat.com>
4261
4262 PR c++/35688
4263 * c-common.c, c-common.h: Revert yesterday's changes.
4264
b4f861b4 42652011-11-06 Jason Merrill <jason@redhat.com>
4266
4267 PR c++/35688
4268 * c-common.c (decl_has_visibility_attr): Split out from...
4269 (c_determine_visibility): ...here.
4270 * c-common.h: Declare it.
4271
83e25171 42722011-11-06 Joseph Myers <joseph@codesourcery.com>
4273
4274 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
4275 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
4276 type.
4277 (check_user_alignment): New. Split out of
4278 handle_aligned_attribute. Disallow integer constants with
4279 noninteger types. Conditionally allow zero.
4280 (handle_aligned_attribute): Use check_user_alignment.
4281 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
4282
1cd6e20d 42832011-11-06 Andrew MacLeod <amacleod@redhat.com>
4284 Richard Henderson <rth@redhat.com>
4285
4286 Merged from cxx-mem-model.
4287
4288 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
19931eea 4289 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
1cd6e20d 4290 parameters that are the same type size.
4291 (get_atomic_generic_size): New. Find size of generic
4292 atomic function parameters and do typechecking.
4293 (add_atomic_size_parameter): New. Insert size into parameter list.
4294 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
4295 either __atomic_exchange_n or external library call.
19931eea 4296 (resolve_overloaded_atomic_compare_exchange): Restructure
1cd6e20d 4297 __atomic_compare_exchange to either _n variant or external library call.
19931eea 4298 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
1cd6e20d 4299 __atomic_load_n or an external library call.
4300 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
4301 __atomic_store_n or an external library call.
4302 (resolve_overloaded_builtin): Handle new __atomic builtins.
4303
7549df0d 43042011-11-04 Eric Botcazou <ebotcazou@adacore.com>
4305
4306 PR c++/50608
4307 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
4308 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
4309 <INDIRECT_REF>: Return the argument.
4310 <ARRAY_REF>: Remove special code for negative offset.
4311 Call fold_build_pointer_plus instead of size_binop.
4312 (fold_offsetof): Remove STOP_REF argument and adjust.
4313 * c-common.h (fold_offsetof_1): Declare.
4314 (fold_offsetof): Remove STOP_REF argument.
4315
7e783eb3 43162011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
4317
4318 PR c++/50810
4319 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
4320 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
4321 Wnarrowing for C++0x and C++98.
4322 * c.opt ([Wnarrowing]): Update.
4323
8fe701f5 43242011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
4325
4326 PR c++/44277
4327 * c.opt: Add Wzero-as-null-pointer-constant.
4328
0d84dc2d 43292011-10-31 Jason Merrill <jason@redhat.com>
4330
67031f52 4331 * c.opt (-fdeduce-init-list): Off by default.
4332
0d84dc2d 4333 PR c++/50920
4334 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
4335 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
4336 and -Wc++11-compat.
4337 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
4338
66f24c41 43392011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
4340
4341 PR c++/30066
4342 * c.opt (fvisibility-inlines-hidden): Description change.
4343
244db24d 43442011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
4345
4346 Implement C++11 user-defined literals.
4347 * c-common.c (build_userdef_literal): New.
4348 * c-common.def: New tree code.
4349 * c-common.h (tree_userdef_literal): New tree struct and accessors.
4350 * c-lex.c (interpret_float): Add suffix parm.
4351 (c_lex_with_flags): Build literal tokens.
4352
235be70f 43532011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
4354
4355 PR c++/50841
4356 Revert:
4357 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
4358
4359 PR c++/50810
4360 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
4361 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
4362 Wnarrowing for C++0x and C++98.
4363 * c.opt ([Wnarrowing]): Update.
4364
4fe0fb1c 43652011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
4366
4367 PR c++/50810
4368 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
4369 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
4370 Wnarrowing for C++0x and C++98.
4371 * c.opt ([Wnarrowing]): Update.
4372
5f7504f9 43732011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
4374
4375 PR c++/45385
4376 * c-common.c (conversion_warning): Remove code looking for
4377 artificial operands.
4378
2a688977 43792011-10-18 Dodji Seketeli <dodji@redhat.com>
4380
4381 PR bootstrap/50760
4382 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
19931eea 4383 !NO_IMPLICIT_EXTERN_C.
2a688977 4384
326e3391 43852011-10-17 Michael Spertus <mike_spertus@symantec.com>
4386
4387 * c-common.c (c_common_reswords): Add __bases,
4388 __direct_bases.
4389 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
4390
43912011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
4392
4393 PR c++/50757
4394 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
4395
62db153a 43962011-10-15 Tom Tromey <tromey@redhat.com>
4397 Dodji Seketeli <dodji@redhat.com>
4398
4399 * c.opt (fdebug-cpp): New option.
4400 * c-opts.c (c_common_handle_option): Handle the option.
4401 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
4402 output stream in parameter. Factorized from ...
4403 (maybe_print_line): ... this. Dump location debug information when
4404 -fdebug-cpp is in effect.
4405 (print_line_1): New static function. Takes an output stream in
4406 parameter. Factorized from ...
4407 (print_line): ... here. Dump location information when -fdebug-cpp
4408 is in effect.
4409 (scan_translation_unit): Dump location information when
4410 -fdebug-cpp is in effect.
4411
ce70f433 44122011-10-15 Tom Tromey <tromey@redhat.com>
4413 Dodji Seketeli <dodji@redhat.com>
4414
4415 * c.opt (ftrack-macro-expansion): New option. Handle it with and
4416 without argument.
4417 * c-opts.c (c_common_handle_option)<case
4418 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
4419 cases. Handle -ftrack-macro-expansion with and without argument.
4420
97bfb9ef 44212011-10-15 Tom Tromey <tromey@redhat.com>
4422 Dodji Seketeli <dodji@redhat.com>
4423
4424 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
4425 (print_line, cb_define, do_line_change): Adjust to avoid touching
4426 the internals of struct line_map. Use the public API instead.
4427 * c-pch.c (c_common_read_pch): Likewise.
4428 * c-lex.c (fe_file_change): Likewise.
4429
326e3391 44302011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
4431
4432 PR c++/17212
4433 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
4434
44352011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
4436
4437 PR c++/33067
4438 * c-pretty-print.c (pp_c_floating_constant): Output
4439 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
4440
b9a16870 44412011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
4442
4443 * c-common.c (def_builtin_1): Delete old interface with two
4444 parallel arrays to hold standard builtin declarations, and replace
4445 it with a function based interface that can support creating
4446 builtins on the fly in the future. Change all uses, and poison
4447 the old names. Make sure 0 is not a legitimate builtin index.
4448 * c-omp.c (c_finish_omp_barrier): Ditto.
4449 (c_finish_omp_taskwait): Ditto.
4450 (c_finish_omp_flush): Ditto.
4451
c7964868 44522011-10-11 Tristan Gingold <gingold@adacore.com>
4453
4454 * c.opt: (fallow-parameterless-variadic-functions): New.
4455
a4e3ffad 44562011-09-08 Dodji Seketeli <dodji@redhat.com>
4457
4458 PR c++/33255 - Support -Wunused-local-typedefs warning
4459 * c-common.h (struct c_language_function::local_typedefs): New
4460 field.
19931eea 4461 (record_locally_defined_typedef, maybe_record_typedef_use)
4462 (maybe_warn_unused_local_typedefs): Declare new functions.
a4e3ffad 4463 * c-common.c (record_locally_defined_typedef)
19931eea 4464 (maybe_record_typedef_use)
4465 (maybe_warn_unused_local_typedefs): Define new functions.
a4e3ffad 4466 * c.opt: Declare new -Wunused-local-typedefs flag.
4467
737a23cc 44682011-09-06 Eric Botcazou <ebotcazou@adacore.com>
4469
4470 PR middle-end/50266
4471 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
4472 computations.
4473
7542c3b4 44742011-09-05 Richard Guenther <rguenther@suse.de>
4475
4476 * c-common.c (complete_array_type): Use ssize_int (-1) instead
4477 of integer_minus_one_node for empty array upper bounds.
4478
1dc92c59 44792011-08-28 Dodji Seketeli <dodji@redhat.com>
4480
4481 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
4482 it's the first time it's being called on this main TU.
4483
2bdf2b6e 44842011-08-24 Richard Guenther <rguenther@suse.de>
4485
4486 PR c/49396
4487 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
4488
44892011-08-22 Gabriel Charette <gchare@google.com>
6ea2c7a3 4490
4491 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
4492 defined in cpp_init_builtins and c_cpp_builtins.
4493
bff4ad11 44942011-08-19 Joseph Myers <joseph@codesourcery.com>
4495
4496 * c-common.c (c_common_reswords): Add __builtin_complex.
4497 * c-common.h (RID_BUILTIN_COMPLEX): New.
4498
985c6e3a 44992011-08-18 Joseph Myers <joseph@codesourcery.com>
4500
4501 * c-common.c (c_common_reswords): Add _Noreturn.
4502 (keyword_is_function_specifier): Handle RID_NORETURN.
4503 * c-common.h (RID_NORETURN): New.
4504
7dfa155b 45052011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
4506
4507 * c-common.c (unsafe_conversion_p): New function. Check if it is
4508 unsafe to convert an expression to the type.
4509 (conversion_warning): Adjust, use unsafe_conversion_p.
4510 * c-common.h (unsafe_conversion_p): New function declaration.
4511
2169f33b 45122011-08-02 Jakub Jelinek <jakub@redhat.com>
4513
4514 * c-common.h (c_finish_omp_atomic): Adjust prototype.
4515 (c_finish_omp_taskyield): New prototype.
4516 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
4517 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
4518 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
4519 or RHS1 have side-effects, evaluate those too in the right spot,
4520 if it is a decl and LHS is also a decl, error out if they
4521 aren't the same.
4522 (c_finish_omp_taskyield): New function.
4523 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
4524 * c-pragma.c (omp_pragmas): Add taskyield.
4525 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
4526 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
4527 PRAGMA_OMP_CLAUSE_MERGEABLE.
4528
ab77850e 45292011-07-25 Dodji Seketeli <dodji@redhat.com>
4530
4531 * c-common.h (set_underlying_type): Remove parm name from
4532 declaration.
4533
6ee97920 45342011-07-25 Romain Geissler <romain.geissler@gmail.com>
4535
4536 * c-pretty-print.h: Search c-common.h in c-family.
19931eea 4537
dc251364 45382011-07-22 Jason Merrill <jason@redhat.com>
4539
1a2a35f0 4540 PR c++/49793
4541 * c.opt (Wnarrowing): New.
4542
27282252 4543 PR c++/30112
4544 * c-common.h: Declare c_linkage_bindings.
4545 * c-pragma.c (handle_pragma_redefine_extname): Use it.
4546
dc251364 4547 PR c++/49813
4548 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
4549 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
4550 as flag_isoc99 for 'restrict'.
4551 (pp_c_specifier_qualifier_list): Likewise for _Complex.
4552
fc501191 45532011-07-21 Ian Lance Taylor <iant@google.com>
4554
4555 PR middle-end/49705
4556 * c-common.c (c_disable_warnings): New static function.
4557 (c_enable_warnings): New static function.
4558 (c_fully_fold_internal): Change local unused_p to bool. Call
4559 c_disable_warnings and c_enable_warnings rather than change
4560 c_inhibit_evaluation_warnings.
4561
07b8f133 45622011-07-20 Jason Merrill <jason@redhat.com>
4563
4564 PR c++/6709 (DR 743)
4565 PR c++/42603 (DR 950)
4566 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
4567 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
4568 (CPP_DECLTYPE): New.
4569 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
4570
2cc66f2a 45712011-07-19 Richard Guenther <rguenther@suse.de>
4572
4573 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
4574 * c-omp.c (c_finish_omp_for): Likewise.
4575
3c802a1e 45762011-07-12 Eric Botcazou <ebotcazou@adacore.com>
4577
4578 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
4579 body on the next line.
4580
98a33d9f 45812011-07-08 Jason Merrill <jason@redhat.com>
4582
3115bda0 4583 PR c++/45437
4584 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
4585
98a33d9f 4586 PR c++/49673
4587 * c-common.c (c_apply_type_quals_to_decl): Don't check
4588 TYPE_NEEDS_CONSTRUCTING.
4589
c38a75b7 45902011-07-06 Richard Guenther <rguenther@suse.de>
4591
4592 * c-common.c (c_common_nodes_and_builtins):
4593 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
4594
e593356b 45952011-07-05 Richard Guenther <rguenther@suse.de>
4596
4597 * c-common.c (c_common_nodes_and_builtins): Build all common
4598 tree nodes first.
4599
fca0886c 46002011-06-27 Jakub Jelinek <jakub@redhat.com>
4601
a68f7a8d 4602 * c-common.h (c_tree_chain_next): New static inline function.
4603
fca0886c 4604 * c-common.c (check_builtin_function_arguments): Handle
4605 BUILT_IN_ASSUME_ALIGNED.
4606
2797f13a 46072011-06-21 Andrew MacLeod <amacleod@redhat.com>
4608
4609 * c-common.c: Add sync_ or SYNC__ to builtin names.
4610 * c-omp.c: Add sync_ or SYNC__ to builtin names.
9cad95b7 4611
46122011-06-20 Pierre Vittet <piervit@pvittet.com>
4613
4614 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
4615 handler.
4616 (gen_pragma_handler): New union.
4617 (internal_pragma_handler): New type.
4618 (c_register_pragma_with_data)
4619 (c_register_pragma_with_expansion_and_data): New functions.
4620
4621 * c-pragma.c (registered_pragmas, c_register_pragma_1)
4622 (c_register_pragma, c_register_pragma_with_expansion)
4623 (c_invoke_pragma_handler): Changed to work with
4624 internal_pragma_handler.
4625 (c_register_pragma_with_data)
4626 (c_register_pragma_with_expansion_and_data): New functions.
4627
218e3e4e 46282011-06-14 Joseph Myers <joseph@codesourcery.com>
4629
4630 * c-common.c: Include common/common-target.h.
4631 (handle_section_attribute): Use
4632 targetm_common.have_named_sections.
4633 * c-cppbuiltin.c: Include common/common-target.h.
4634 (c_cpp_builtins): Use targetm_common.except_unwind_info.
4635
41e53ed2 46362011-06-10 Richard Guenther <rguenther@suse.de>
4637
4638 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
4639 to print a IDENTIFIER_NODE.
4640
a6f06169 46412011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4642 Joseph Myers <joseph@codesourcery.com>
4643
4644 * c.opt (fbuilding-libgcc): New option.
4645 * c-cppbuiltin.c (c_cpp_builtins): Define
4646 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
4647
1ea9269b 46482011-06-07 Jason Merrill <jason@redhat.com>
4649
8ce59854 4650 * c-common.c (max_tinst_depth): Lower default to 900.
4651
1ea9269b 4652 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
4653
1af0124d 46542011-06-07 Richard Guenther <rguenther@suse.de>
4655
4656 * c-common.c (c_common_nodes_and_builtins): Do not set
4657 size_type_node or call set_sizetype.
4658
0e9a4c01 46592011-06-07 Dodji Seketeli <dodji@redhat.com>
4660
4661 PR debug/49130
4662 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
19931eea 4663 type when using pointer comparison to compare types.
0e9a4c01 4664
90b40725 46652011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
4666
4667 * c.opt: Add -Wdelete-non-virtual-dtor.
4668 * c-opts.c (c_common_handle_option): Include it in -Wall.
4669
fc9c9e87 46702011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
4671
4672 PR bootstrap/49190
4673
4674 Revert:
4675 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
4676
4677 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
4678 not tree_common.
4679
d0389adc 46802011-05-27 Jakub Jelinek <jakub@redhat.com>
4681
4682 PR c++/49165
4683 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
4684 C++ don't call c_common_truthvalue_conversion on void type arms.
4685
cacfdc02 46862011-05-27 Nathan Froyd <froydnj@codesourcery.com>
4687
4688 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
4689 (stmt_list_stack): Define.
4690 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
4691 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
4692
027fc6ef 46932011-05-26 Nathan Froyd <froydnj@codesourcery.com>
4694
4695 * c-common.c (warning_candidate_p): Check for BLOCKs.
4696
f21317a1 46972011-05-26 Nathan Froyd <froydnj@codesourcery.com>
4698
4699 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
4700 not tree_common.
4701
789e953d 47022011-05-25 Jakub Jelinek <jakub@redhat.com>
4703
4704 * c-common.c (def_fn_type): Remove extra va_end.
4705
7f506bca 47062011-05-23 Jason Merrill <jason@redhat.com>
4707
4708 PR c++/48106
4709 * c-common.c (c_common_get_narrower): New.
4710 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
4711
774e9d58 47122011-05-23 Nathan Froyd <froydnj@codesourcery.com>
4713
4714 * c-common.h (check_function_arguments): Tweak prototype of
4715 check_function_arguments.
4716 * c-common.c (check_function_arguments): Likewise. Adjust
4717 calls to check_function_nonnull, check_function_format, and
4718 check_function_sentinel.
4719 (check_function_sentinel): Take a FUNCTION_TYPE rather than
4720 separate attributes and typelist arguments. Use
4721 FOREACH_FUNCTION_ARGS to iterate over argument types.
4722
23407dc9 47232011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
4724
4725 * c-common.c (c_common_reswords): Reorder.
4726 * c-common.h (rid): Likewise.
4727
3a939d12 47282011-05-10 Nathan Froyd <froydnj@codesourcery.com>
4729
4730 * c-common.c (def_fn_type): Don't call build_function_type, call
4731 build_function_type_array or build_varargs_function_type_array
4732 instead.
4733 (c_common_nodes_and_builtins): Likewise.
4734
b6e3dd65 47352011-05-05 Nathan Froyd <froydnj@codesourcery.com>
4736
4737 * c-common.c (c_add_case_label): Omit the loc argument to
4738 build_case_label.
4739 * c-common.h (build_case_label): Remove.
4740 * c-semantics.c (build_case_label): Remove.
4741
4232a958 47422011-05-05 Joseph Myers <joseph@codesourcery.com>
4743
4744 * c-objc.h (objc_start_method_definition): Update prototype.
4745 * stub-objc.c (objc_start_method_definition): Add extra parameter.
4746
d0af78c5 47472011-05-04 Nathan Froyd <froydnj@codesourcery.com>
4748
4749 * c-common.c (check_main_parameter_types): Reindent. Don't use
4750 TYPE_ARG_TYPES directly.
4751 (handle_nonnull_attribute): Likewise.
4752 (sync_resolve_params): Likewise.
4753 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
4754 to check_format_string.
4755 (handle_format_attribute): Likewise.
4756 (check_format_string): Take a function type to examine instead of
4757 a type list. Use a function_arg_iterator to step through argument
4758 types.
4759
ceb7b692 47602011-05-04 Richard Guenther <rguenther@suse.de>
4761
4762 * c-common.c (fix_string_type): Use size_int for index type bounds.
4763 (start_fname_decls): Do not pass NULL to build_int_cst.
4764 (c_init_attributes): Likewise.
4765 * c-lex.c (c_lex_with_flags): Likewise.
4766
c66c81be 47672011-04-27 Jason Merrill <jason@redhat.com>
4768
4769 * c-common.c (make_tree_vector_from_list): New.
4770 * c-common.h: Declare it.
4771
16930c72 47722011-04-26 Richard Guenther <rguenther@suse.de>
4773
4774 PR preprocessor/48248
4775 * c-ppoutput.c (maybe_print_line): Always optimize newlines
4776 for output size with -P.
4777
23407dc9 47782011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
4779
4780 * c-common.c (struct c_common_resword): Add __underlying_type.
4781 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
4782
dd045aee 47832011-04-20 Jim Meyering <meyering@redhat.com>
4784
4785 * c-format.c (init_dollar_format_checking): Remove useless
4786 if-before-free.
4787
394dd737 47882011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
4789
4790 * c-objc.h (objc_get_interface_ivars): Removed.
23407dc9 4791 (objc_detect_field_duplicates): New.
394dd737 4792 * stub-objc.c: Likewise.
23407dc9 4793
a758bf7d 47942011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
4795
4796 * stub-objc.c (objc_declare_protocols): Renamed to
4797 objc_declare_protocol.
4798 * c-objc.h: Likewise.
23407dc9 4799
29d7200d 48002011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
4801
4802 * stub-objc.c (objc_declare_class): Updated argument name.
4803
9b88d08d 48042011-04-12 Nathan Froyd <froydnj@codesourcery.com>
4805
4806 * c-common.h (c_common_init_ts): Declare.
4807 * c-common.c (c_common_init_ts): Define.
4808
4185cf58 48092011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
4810
4811 * c-objc.h (objc_build_message_expr): Updated prototype.
4812 * stub-objc.c (objc_build_message_expr): Likewise.
19931eea 4813
5a90471f 48142011-04-12 Martin Jambor <mjambor@suse.cz>
4815
4816 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
4817 of cgraph_node.
4818
783bb57e 48192011-04-11 Richard Guenther <rguenther@suse.de>
4820
4821 * c-common.c (complete_array_type): Build a range type of
4822 proper type.
4823
c33080b9 48242011-04-08 Nathan Froyd <froydnj@codesourcery.com>
4825
4826 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
4827 (handle_type_generic_attribute): Likewise.
4828
f8913d47 48292011-04-07 Jason Merrill <jason@redhat.com>
4830
4831 PR c++/48450
4832 * c-common.c (c_common_truthvalue_conversion): Don't ignore
4833 conversion from C++0x scoped enum.
4834
c94b1d0e 48352011-04-06 Joseph Myers <joseph@codesourcery.com>
4836
4837 * c-target-def.h: New file.
4838 * c-target.def: New file.
4839 * c-target.h: New file.
4840 * c-common.c (targetcm): Don't define here.
4841 * c-common.h (default_handle_c_option): Declare.
4842 * c-format.c: Include c-target.h instead of target.h.
4843 * c-opts.c: Include c-target.h instead of target.h. Explicitly
4844 include tm.h.
4845 (default_handle_c_option): Move from targhooks.c.
4846
acb10f41 48472011-03-29 Jakub Jelinek <jakub@redhat.com>
4848
4849 PR preprocessor/48248
4850 * c-ppoutput.c (print): Add src_file field.
4851 (init_pp_output): Initialize it.
4852 (maybe_print_line): Don't optimize by adding up to 8 newlines
4853 if map->to_file and print.src_file are different file.
4854 (print_line): Update print.src_file.
4855
82715bcd 48562011-03-25 Kai Tietz <ktietz@redhat.com>
4857
4858 * c-ada-spec.c (compare_comment): Use filename_cmp
4859 instead of strcmp for filename.
4860
451c8e2f 48612011-03-25 Jeff Law <law@redhat.com>
4862
1f78217c 4863 * c-common.c (def_fn_type): Add missing va_end.
451c8e2f 4864
3c47771c 48652011-03-25 Jason Merrill <jason@redhat.com>
4866
4867 * c.opt: Add -std=c++03.
4868
97e6200f 48692011-03-22 Eric Botcazou <ebotcazou@adacore.com>
4870
4871 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
4872
ac86af5d 48732011-03-17 Kai Tietz
4874
4875 PR target/12171
ee212425 4876 * c-pretty-print.c (pp_c_specifier_qualifier_list):
4877 Display allowed attributes for function pointer types.
4878 (pp_c_attributes_display): New function to display
4879 attributes having affects_type_identity flag set to true.
4880 * c-pretty-print.h (pp_c_attributes_display): New prototype.
4881
ac86af5d 4882 * c-common.c (c_common_attribute_table):
4883 Add new element.
4884 (c_common_format_attribute_table): Likewise.
4885
914d1151 48862011-03-18 Jason Merrill <jason@redhat.com>
4887
69788bdf 4888 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
4889 * c-common.h: Don't declare it here.
4890 * c-common.c: Or define it here.
4891 * c-opts.c (c_common_handle_option): Or set it here.
4892
914d1151 4893 PR c++/35315
4894 * c-common.c (handle_transparent_union_attribute): Don't
4895 make a duplicate type in C++.
4896
54cf6eed 48972011-03-15 Jason Merrill <jason@redhat.com>
4898
4899 * c-common.c (max_constexpr_depth): New.
4900 * c-common.h: Declare it.
4901 * c-opts.c (c_common_handle_option): Set it.
4902 * c.opt (fconstexpr-depth): New option.
4903
02cb1060 49042011-03-11 Jason Merrill <jason@redhat.com>
4905
9bf1c74e 4906 * c-common.c (attribute_takes_identifier_p): Add missing const.
4907
02cb1060 4908 PR c++/46803
4909 * c-common.c (attribute_takes_identifier_p): Assume that an
4910 unknown attribute takes an identifier.
4911
ecf2703d 49122011-03-07 Nathan Froyd <froydnj@codesourcery.com>
4913
4914 PR c/47786
4915 * c-common.c (c_type_hash): Call list_length instead of iterating
4916 through DECL_CHAIN. Rename 'i' to 'n_elements'.
4917
2b19dfe4 49182011-02-19 Jakub Jelinek <jakub@redhat.com>
4919
4920 PR c/47809
4921 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
4922
29cf2335 49232011-02-17 Iain Sandoe <iains@gcc.gnu.org>
4924
4925 * c.opt (fobjc-abi-version=) New.
4926 (fobjc-nilcheck): New.
4927
fad3f658 49282011-02-03 Nathan Froyd <froydnj@codesourcery.com>
4929
4930 PR c++/46890
4931 * c-common.h (keyword_is_decl_specifier): Declare.
4932 * c-common.c (keyword_is_decl_specifier): Define.
4933 (keyword_is_function_specifier): New function.
4934
a12319b3 49352011-01-26 Jakub Jelinek <jakub@redhat.com>
4936
4937 PR c/47473
4938 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
4939 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
4940 REAL_TYPE.
4941
5c128dc8 49422011-01-26 Arnaud Charlet <charlet@adacore.com>
4943
4944 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
4945
8d67b0c7 49462011-01-26 Jakub Jelinek <jakub@redhat.com>
4947
4948 PR pch/47430
4949 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
4950 after init_c_lex if pch_file is set.
4951
0675168d 49522011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
4953
e8911163 4954 PR c++/43601
0675168d 4955 * c.opt (-fkeep-inline-dllexport): New switch.
4956
0725e25c 49572011-01-12 Richard Guenther <rguenther@suse.de>
4958
4959 PR middle-end/32511
4960 * c-common.c (handle_weak_attribute): Warn instead of error
4961 on declaring an inline function weak.
4962
fdd84b77 49632011-01-05 Tom Tromey <tromey@redhat.com>
4964
4965 * c-common.h (lvalue_error): Update.
4966 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
4967 not error.
4968
e6e73d14 49692010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
19931eea 4970
d67e8485 4971 PR objc/47075
4972 * c-objc.h (objc_finish_message_expr): Added argument to
4973 prototype.
4974
a36cf284 49752010-12-22 Nathan Froyd <froydnj@codesourcery.com>
4976
4977 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
4978 Use prototype_p.
4979
33b3681f 49802010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
4981
4982 * c-objc.h (objc_maybe_warn_exceptions): New.
19931eea 4983 * stub-objc.c (objc_maybe_warn_exceptions): New.
33b3681f 4984
a1f90215 49852010-12-10 Nathan Froyd <froydnj@codesourcery.com>
4986
4987 * c-common.h (readonly_error): Declare.
4988 * c-common.c (readonly_error): Define.
4989
b1bbc8e5 49902010-12-09 Nathan Froyd <froydnj@codesourcery.com>
4991
4992 * c-common.h (invalid_indirection_error): Declare.
4993 * c-common.c (invalid_indirection_error): Define.
4994
b0d55af9 49952010-12-03 Richard Guenther <rguenther@suse.de>
4996
4997 PR c/46745
4998 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
4999 (pp_c_unary_expression): Likewise.
5000 (pp_c_expression): Likewise.
5001
d7489d8d 50022010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
5003
5004 * c-common.h (objc_finish_function): New.
5005 (objc_non_volatilized_type): Removed.
5006 (objc_type_quals_match): Removed.
5007 * stub-objc.c (objc_finish_function): New.
5008 (objc_non_volatilized_type): Removed.
5009 (objc_type_quals_match): Removed.
19931eea 5010
92468061 50112010-11-30 Joseph Myers <joseph@codesourcery.com>
5012
5013 * c-common.h (parse_optimize_options): Declare.
5014 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
5015 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
5016
967958e4 50172010-11-29 Joseph Myers <joseph@codesourcery.com>
5018
5019 * c-opts.c (check_deps_environment_vars): Use getenv instead of
5020 GET_ENVIRONMENT.
5021 * c-pch.c (O_BINARY): Don't define here.
5022 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
5023
b213bf24 50242010-11-25 Joseph Myers <joseph@codesourcery.com>
5025
5026 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
5027 targetm.except_unwind_info.
5028
9faf44d6 50292010-11-23 Joseph Myers <joseph@codesourcery.com>
5030
5031 * c-opts.c (c_common_handle_option): Pass location to
5032 set_struct_debug_option.
5033
79396169 50342010-11-23 Joseph Myers <joseph@codesourcery.com>
5035
5036 * c-common.c (visibility_options): Move from ../opts.c.
5037 * c-common.h (struct visibility_flags, visibility_options):
5038 Declare here.
5039 * c-opts.c (finish_options): Rename to c_finish_options.
5040 (c_common_init): Update call to finish_options.
5041
b4aa4123 50422010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
5043
5044 PR objc/34033
5045 * c-lex.c (lex_string): Check that each string in an Objective-C
5046 string concat sequence starts with either one or zero '@', and
5047 that there are no spurious '@' signs at the end.
5048
3e0e49f2 50492010-11-20 Joseph Myers <joseph@codesourcery.com>
5050
5051 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
5052 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
5053 HANDLE_PRAGMA_VISIBILITY.
5054 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
5055 HANDLE_PRAGMA_VISIBILITY): Don't define.
5056 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
5057
a9ffdd35 50582010-11-20 Nathan Froyd <froydnj@codesourcery.com>
5059
5060 PR c++/16189
5061 PR c++/36888
5062 PR c++/45331
5063 * c-common.h (keyword_begins_type_specifier): Declare.
5064 (keyword_is_storage_class_specifier): Declare.
5065 (keyword_is_type_qualifier): Declare.
5066 * c-common.c (keyword_begins_type_specifier): New function.
5067 (keyword_is_storage_class_specifier): New function.
5068 (keyword_is_type_qualifier): Declare.
5069
93be21c0 50702010-11-19 Joseph Myers <joseph@codesourcery.com>
5071
5072 PR c/46547
5073 * c-common.c (in_late_binary_op): Define.
5074 (c_common_truthvalue_conversion): Check in_late_binary_op before
5075 calling c_save_expr.
5076 * c-common.h (in_late_binary_op): Declare.
5077
d7175aef 50782010-11-19 Joseph Myers <joseph@codesourcery.com>
5079
5080 * c-opts.c (c_common_handle_option): Update calls to
5081 set_struct_debug_option.
5082
c213e196 50832010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
5084
5085 * c-common.h (objc_declare_protocols): Added additional argument.
5086 * stub-objc.c (objc_declare_protocol): Same change.
19931eea 5087
0b5fc5d6 50882010-11-18 Nathan Froyd <froydnj@codesourcery.com>
5089
5090 PR c/33193
5091 * c-common.h (build_real_imag_expr): Declare.
5092 * c-semantics.c (build_real_imag_expr): Define.
5093
b8ba44e7 50942010-11-17 Joseph Myers <joseph@codesourcery.com>
5095
5096 * c-opts.c (c_common_parse_file): Take no arguments.
5097 * c-common.h (c_common_parse_file): Update prototype.
5098
6ef8d12f 50992010-11-16 Jakub Jelinek <jakub@redhat.com>
5100
5101 PR c++/46401
5102 * c-common.c (warning_candidate_p): Don't track non-const calls
5103 or STRING_CSTs.
5104
929d2a90 51052010-11-15 Ian Lance Taylor <iant@google.com>
5106
5107 * c-lex.c (init_c_lex): Set macro debug callbacks if
5108 flag_dump_go_spec is set.
5109
e4a7640a 51102010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
5111
5112 * c-common.h (objc_build_incr_expr_for_property_ref): New.
5113 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
5114
597d2d81 51152010-11-15 Nathan Froyd <froydnj@codesourcery.com>
5116
5117 PR preprocessor/45038
5118 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
5119 dialects.
5120
c123f04d 51212010-11-12 Joseph Myers <joseph@codesourcery.com>
5122
5123 * c-common.h (c_family_lang_mask): Declare.
5124 * c-opts.c (c_family_lang_mask): Make extern.
5125 * c-pragma.c (handle_pragma_diagnostic): Use
5126 control_warning_option.
5127
3c6c0e40 51282010-11-12 Joseph Myers <joseph@codesourcery.com>
5129
5130 * c-common.c (parse_optimize_options): Update call to
5131 decode_options.
5132 * c-common.h (c_common_handle_option): Update prototype.
5133 * c-opts.c (c_common_handle_option): Take location_t parameter and
5134 pass it to other functions.
5135
19ec5c9e 51362010-11-11 Joseph Myers <joseph@codesourcery.com>
5137
5138 * c-opts.c (warning_as_error_callback): Remove.
5139 (c_common_initialize_diagnostics): Don't call
5140 register_warning_as_error_callback.
5141 (c_common_handle_option): Handle -Werror=normalized= here.
5142
bf776685 51432010-11-10 Joseph Myers <joseph@codesourcery.com>
5144
5145 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
5146 in diagnostic.
5147 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
5148 letter.
5149 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
5150 Remove trailing '.' from diagnostics.
5151 * c.opt (Wwrite-strings_: Avoid '`' in help text.
5152
6bd9d862 51532010-11-10 Joseph Myers <joseph@codesourcery.com>
5154
5155 * c-common.c (parse_optimize_options): Pass global_dc to
5156 decode_options.
5157 * c-opts.c (c_common_handle_option): Pass &global_options to
5158 set_Wstrict_aliasing.
5159 * c.opt (v): Don't mark Common or document here.
5160
1f6616ee 51612010-11-06 Iain Sandoe <iains@gcc.gnu.org>
5162
5163 PR target/44981
5164 * c-format.c (format_type): New type gcc_objc_string_format_type.
5165 (valid_stringptr_type_p): New.
5166 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
19931eea 5167 (check_format_string): Pass expected type, use
1f6616ee 5168 valid_stringptr_type_p (), check that the format string types are
5169 consistent with the format specification.
5170 (decode_format_attr): Warn if NSString is used outside objective-c.
5171 (format_types_orig): Add NSString.
5172 (format_name): New.
5173 (format_flags): New.
5174 (check_format_arg): Handle format strings requiring an external parser.
5175 first_target_format_type: New variable.
5176 (handle_format_attribute): Set up first_target_format_type, pass the
5177 expected format arg string type to check_format_string().
5178 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
5179 * stub-objc.c (objc_string_ref_type_p): New.
5180 (objc_check_format_arg): New.
5181
b0d0931f 51822010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
5183
19931eea 5184 Fixed using the Objective-C 2.0 dot-syntax with class names.
b0d0931f 5185 * c-common.h (objc_build_class_component_ref): New.
5186 * stub-objc.c (objc_build_class_component_ref): New.
5187
f26877d5 51882010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
5189
5190 * c.opt (Wproperty-assign-default): New option.
5191
1ef143b6 51922010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
5193
5194 Implemented -fobjc-std=objc1 flag.
5195 * c.opt (fobjc-std=objc1): New option.
5196
8c582e4f 51972010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
5198
5199 Implemented format and noreturn attributes for Objective-C methods.
5200 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
5201 attribute for Objective-C methods.
5202
8637f1db 52032010-10-31 Jason Merrill <jason@redhat.com>
5204
5205 * c-common.c (conversion_warning, warn_for_collisions_1): Use
5206 EXPR_LOC_OR_HERE.
5207
9d9f5bb3 52082010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
5209
5210 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
5211 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
5212 (objc_add_property_declaration): Removed arguments for copies and
5213 ivar.
5214 (objc_build_getter_call): Renamed to
5215 objc_maybe_build_component_ref.
5216 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
5217 (objc_is_property_ref): New.
5218 * c-common.c (c_common_reswords): Removed copies and ivar.
5219 * stub-objc.c (objc_add_property_declaration): Removed arguments
5220 for copies and ivar.
5221 (objc_build_getter_call): Renamed to
5222 objc_maybe_build_component_ref.
5223 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
5224 (objc_is_property_ref): New.
19931eea 5225
56f907a0 52262010-10-29 Arnaud Charlet <charlet@adacore.com>
5227 Matthew Gingell <gingell@adacore.com>
5228
5229 * c-ada-spec.c (separate_class_package): New function.
5230 (pp_ada_tree_identifier): Prefix references to C++ classes with the
5231 name of their enclosing package.
5232 (print_ada_declaration): Use separate_class_package.
5233
b5fa273e 52342010-10-27 Jason Merrill <jason@redhat.com>
5235
5290e253 5236 * c-common.c (c_common_reswords): Add __is_literal_type.
5237 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
5238
b5fa273e 5239 * c-common.c (check_case_value): Remove special C++ code.
5240
7590f0e5 52412010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
5242
5243 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
5244 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
5245 and RID_LAST_PATTR.
5246 (objc_add_property_declaration): Added additional arguments.
5247 (objc_property_attribute_kind): Removed.
5248 (objc_set_property_attr): Removed.
5249 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
5250 copy and nonatomic.
5251 * stub-objc.c (objc_add_property_declaration): Added additional
5252 arguments.
5253 (objc_set_property_attr): Removed.
19931eea 5254
1d894bcf 52552010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
5256
5257 * c-common.h (objc_add_property_variable): Renamed to
5258 objc_add_property_declaration. Added location argument.
5259 * stub-objc.c (objc_add_property_variable): Same change.
8204c077 5260
e23bf1fb 52612010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
5262
5263 * c-common.h (objc_maybe_printable_name): New.
5264 * stub-objc.c (objc_maybe_printable_name): New.
5265
93426222 52662010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
5267 Andrew Pinski <pinskia@gmail.com>
5268
5269 * c-common.h (c_common_mark_addressable_vec): Declare.
5270 * c-common.c (c_common_mark_addressable_vec): New function.
5271
45b2b110 52722010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
5273
5274 * c-common.h (objc_set_method_type): Removed.
5275 (objc_add_method_declaration): Added boolean argument.
5276 (objc_start_method_definition): Same change.
5277 (objc_build_method_signature): Same change.
5278 * stub-objc.c (objc_set_method_type): Removed.
5279 (objc_add_method_declaration): Added boolean argument.
5280 (objc_start_method_definition): Same change.
5281 (objc_build_method_signature): Same change.
5282
64cd9619 52832010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
5284
5285 * c-common.h (finish_file): Removed.
5286 (objc_write_global_declarations): New.
5287 * c-opts.c (c_common_parse_file): Do not call finish_file.
5288 * stub-objc.c (objc_write_global_declarations): New.
19931eea 5289
e1f293c0 52902010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
5291
5292 Implemented parsing @synthesize and @dynamic for
5293 Objective-C/Objective-C++.
5294 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
5295 (objc_add_synthesize_declaration): New.
5296 (objc_add_dynamic_declaration): New.
5297 * c-common.c (c_common_reswords): Add synthesize and dynamic.
5298 * stub-objc.c (objc_add_synthesize_declaration): New.
5299 (objc_add_dynamic_declaration): New.
19931eea 5300
ef97a312 53012010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
5302
5303 PR target/46041
5304 * c-cppbuiltin.c (mode_has_fma): Move function here from
5305 builtins.c. Don't use the fma optab, instead just use the
5306 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
5307 using -save-temps.
5308
69b07042 53092010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
5310
5311 Merge from 'apple/trunk' branch on FSF servers.
ef97a312 5312
69b07042 5313 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
5314
19931eea 5315 Radar 4330422
69b07042 5316 * c-common.h (objc_non_volatilized_type): New declaration
5317 * stub-objc.c (objc_non_volatilized_type): New stub.
5318
f15f2e56 53192010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
5320
69b07042 5321 Merge from 'apple/trunk' branch on FSF servers.
f15f2e56 5322
5323 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
5324
19931eea 5325 Radar 4133425
f15f2e56 5326 * c-common.h (objc_diagnose_private_ivar): New decl.
ef97a312 5327 * stub-objc.c (objc_diagnose_private_ivar): New stub.
f15f2e56 5328
4a8875ed 53292010-10-17 Iain Sandoe <iains@gcc.gnu.org>
5330
5331 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
5332 * c-common.h (enum rid): Add RID_AT_PACKAGE.
5333 (objc_ivar_visibility_kind): New enum.
5334 (objc_set_visibility): Adjust prototype to use visibility enum.
ef97a312 5335 * stub-objc.c (objc_set_visibility): Adjust stub to use
4a8875ed 5336 visibility enum.
5337
7e0713b1 53382010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
5339
5340 * c-cppbuiltin.c (builtin_define_float_constants): Emit
5341 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
5342 has the appropriate fma builtins.
5343 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
5344
86c110ac 53452010-10-14 Iain Sandoe <iains@gcc.gnu.org>
5346
7e0713b1 5347 merge from FSF apple 'trunk' branch.
86c110ac 5348 2006 Fariborz Jahanian <fjahanian@apple.com>
7e0713b1 5349
86c110ac 5350 Radars 4436866, 4505126, 4506903, 4517826
5351 * c-common.c (c_common_resword): Define @property and its attributes.
5352 * c-common.h: Define property attribute enum entries.
5353 (OBJC_IS_PATTR_KEYWORD): New.
5354 (objc_property_attribute_kind): New enum.
5355 Declare objc_set_property_attr (), objc_add_property_variable (),
5356 objc_build_getter_call () and objc_build_setter_call ().
5357 * stub-objc.c (objc_set_property_attr): New stub.
5358 (objc_add_property_variable): Likewise.
5359 (objc_build_getter_call): Likewise.
5360 (objc_build_setter_call) Likewise.
7e0713b1 5361
40c8d1dd 53622010-10-13 Iain Sandoe <iains@gcc.gnu.org>
5363
7e0713b1 5364 merge from FSF apple 'trunk' branch.
40c8d1dd 5365 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
5366
5367 Radar 3803157 (method attributes)
5368 * c-common.c (handle_deprecated_attribute): Recognize
5369 objc methods as valid declarations.
5370 * c-common.h: Declare objc_method_decl ().
7e0713b1 5371 * stub-objc.c (objc_method_decl): New stub.
40c8d1dd 5372
f3f006ad 53732010-10-08 Joseph Myers <joseph@codesourcery.com>
5374
5375 * c-common.c (parse_optimize_options): Call
5376 decode_cmdline_options_to_array_default_mask before
5377 decode_options. Update arguments to decode_options.
5378 * c-common.h (c_common_init_options_struct): Declare.
5379 * c-opts.c (c_common_init_options_struct): New. Split out from
5380 c_common_init_options.
5381
0a65c3bb 53822010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
5383
5384 Implemented fast enumeration for Objective-C.
5385 * c-common.h (objc_finish_foreach_loop): New.
5386 * stub-objc.c (objc_finish_foreach_loop): New.
5387
24ca3b4e 53882010-10-05 Joseph Myers <joseph@codesourcery.com>
5389
5390 * c-common.h (struct diagnostic_context): Don't declare here.
5391 (c_common_initialize_diagnostics): Declare using
5392 diagnostic_context typedef.
5393 * c-opts.c (c_common_handle_option): Pass global_dc to
5394 handle_generated_option.
5395
f83b64ca 53962010-10-04 Joseph Myers <joseph@codesourcery.com>
5397
5398 * c-opts.c (c_common_handle_option): Pass &global_options_set to
5399 handle_generated_option.
5400
2fdec027 54012010-10-03 Ian Lance Taylor <iant@google.com>
5402
5403 * c.opt (-fplan9-extensions): New option.
5404
41acdfa4 54052010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5406
5407 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
5408 Remove.
5409 (c_cpp_builtins): Call functions from cppbuiltin.c instead
5410 of duplicating code.
5411
069761fb 54122010-09-30 Iain Sandoe <iains@gcc.gnu.org>
5413
5414 * c-common.c: Add two new entries for @optional
5415 and @required keywords.
5416
5417 merge from FSF 'apple/trunk' branch.
5418 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
5419
5420 Radar 4386773
5421 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
5422 objective-c keywords.
5423 (objc_set_method_opt): New declaration.
5424 * stub-objc.c (objc_set_method_opt): New stub.
19931eea 5425
2c5d2e39 54262010-09-30 Joseph Myers <joseph@codesourcery.com>
5427
5428 * c-common.c (handle_optimize_attribute): Pass &global_options to
5429 cl_optimization_save and cl_optimization_restore.
5430 * c-opts.c (c_common_handle_option): Pass &global_options to
5431 handle_generated_option.
5432 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
5433 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
5434 &global_options to cl_optimization_restore.
5435
e5c75ac3 54362010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
5437
5438 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
5439 Objective-C/Objective-C++ keywords.
5440
3511333e 54412010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
e147d6aa 5442
19931eea 5443 Merge from 'apple/trunk' branch on FSF servers.
5444
e147d6aa 5445 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
5446
5447 Radar 4281748
5448 * c-common.h (objc_check_global_decl): New declaration.
5449 * stub-objc.c (objc_check_global_decl): New stub.
5450
5461e683 54512010-09-29 Joseph Myers <joseph@codesourcery.com>
5452
5453 * c.opt: Don't use VarExists.
5454
5ae82d58 54552010-09-29 Joseph Myers <joseph@codesourcery.com>
5456
5457 * c-common.c (c_cpp_error): Update names of diagnostic_context
5458 members.
5459 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
5460 cl_optimization members.
5461 * c-opts.c (warning_as_error_callback, c_common_handle_option,
5462 sanitize_cpp_opts, finish_options): Update names of cpp_options
5463 members.
5464
b27e241e 54652010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
5466
5467 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
5468 (objc_is_reserved_word): Removed.
5469 * c-common.c: Updated comments.
5470 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
5471 objc_is_reserved_word.
5472 * stub-objc.c (objc_is_reserved_word): Removed.
5473
03fc2271 54742010-09-28 Iain Sandoe <iains@gcc.gnu.org>
5475
19931eea 5476 * c-common.h (objc_add_method_declaration): Adjust prototype to
03fc2271 5477 include attributes.
5478 (objc_start_method_definition): Likewise.
5479 (objc_build_keyword_decl): Likewise.
5480 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
5481 (objc_start_method_definition): Likewise.
5482 (objc_build_keyword_decl): Likewise.
5483
a336eb4b 54842010-09-28 Iain Sandoe <iains@gcc.gnu.org>
5485
5486 * c-common.h (objc_start_class_interface): Adjust prototype.
5487 (objc_start_category_interface): Likewise.
5488 (objc_start_protocol): Likewise.
5489 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
5490 (objc_start_class_interface): Likewise.
5491 (objc_start_category_interface): Likewise.
5492
48b14f50 54932010-09-27 Ian Lance Taylor <iant@google.com>
5494
5495 * c-common.c (c_common_attribute_table): Add no_split_stack.
5496 (handle_no_split_stack_attribute): New static function.
5497
4abfc532 54982010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
5499
19931eea 5500 Merge from 'apple/trunk' branch on FSF servers.
4abfc532 5501
5502 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
5503
19931eea 5504 Radar 4229905
4abfc532 5505 * c-common.h (objc_have_common_type): New declaration.
5506 * stub-objc.c (objc_have_common_type): New stub.
5507
5508 2005-06-22 Ziemowit Laski <zlaski@apple.com>
5509
5510 Radar 4154928
5511 * c-common.h (objc_common_type): New prototype.
19931eea 5512 * stub-objc.c (objc_common_type): New stub.
4abfc532 5513
7bd95dfd 55142010-09-24 Jan Hubicka <jh@suse.cz>
5515
5516 * c-common.c (handle_leaf_attribute): New function.
5517 (struct attribute_spec c_common_att): Add leaf.
5518
5789e05b 55192010-09-22 Joseph Myers <joseph@codesourcery.com>
5520
5521 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
5522 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
5523 -dump, -dump=, -imacros, -imacros=, -include, -include=,
5524 -include-barrier, -include-directory, -include-directory=,
5525 -include-directory-after, -include-directory-after=,
5526 -include-prefix, -include-prefix=, -include-with-prefix,
5527 -include-with-prefix=, -include-with-prefix-after,
5528 -include-with-prefix-after=, -include-with-prefix-before,
5529 -include-with-prefix-before=, -no-integrated-cpp,
5530 -no-line-commands, -no-standard-includes, -no-warnings, -output,
5531 -output=, -pedantic, -pedantic-errors, -preprocess,
5532 -print-missing-file-dependencies, -trace-includes, -traditional,
5533 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
5534 -user-dependencies, -verbose, -write-dependencies,
5535 -write-user-dependencies, no-integrated-cpp, traditional): New.
5536
e6fb54ba 55372010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
5538
5539 PR objc/23710
9b60f3b0 5540 * c-common.h (objc_start_method_definition): Return bool instead
5541 of void.
5542 * stub-objc.c (objc_start_method_definition): Return bool instead
5543 of void.
5544
55452010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
5546
5547 PR objc/25965
5548 * c-common.h (objc_get_interface_ivars): New declaration.
5549 * stub-objc.c (objc_get_interface_ivars): New stub.
e6fb54ba 5550
e44b0a1f 55512010-09-15 Ian Lance Taylor <iant@google.com>
5552
5553 * c-common.c (parse_optimize_options): Do not capitalize warning
ebd7c4c1 5554 messages. Remove period at end of warning message.
e44b0a1f 5555
85c0a25c 55562010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5557
5558 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
5559 (handle_alias_attribute): ... here.
5560 (handle_ifunc_attribute): New.
5561
5ba33bf4 55622010-09-06 Mark Mitchell <mark@codesourcery.com>
5563
5564 * c-common.h (do_warn_double_promotion): Declare.
5565 * c-common.c (do_warn_double_promotion): Define.
5566
c920faa3 55672010-09-05 Mark Mitchell <mark@codesourcery.com>
5568
5569 * c.opt (Wdouble-promotion): New.
5570
9604e070 55712010-09-02 Joseph Myers <joseph@codesourcery.com>
5572
5573 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
5574 fvtable-thunks, fxref): Mark no longer supported in help text.
5575
3b0273a1 55762010-09-02 Joseph Myers <joseph@codesourcery.com>
5577
5578 * c.opt (Wimport, fall-virtual, falt-external-templates,
5579 fdefault-inline, fenum-int-equiv, fexternal-templates,
5580 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
5581 fname-mangling-version-, fnew-abi, fnonnull-objects,
5582 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
5583 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
5584 applicable.
5585 (fhandle-exceptions): Mark with Alias and Warn.
5586 * c-opts.c (c_common_handle_option): Don't handle options marked
5587 as ignored.
5588
67089c6b 55892010-09-02 Joseph Myers <joseph@codesourcery.com>
5590
5591 * c.opt (Wcomments, Werror-implicit-function-declaration,
5592 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
5593 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
5594 aliases.
5595 * c-common.c (option_codes): Use OPT_Wcomment instead of
5596 OPT_Wcomments.
5597 * c-opts.c (warning_as_error_callback, c_common_handle_option):
5598 Don't handle options marked as aliases.
5599
2af087f2 56002010-08-25 Richard Guenther <rguenther@suse.de>
5601
5602 * c-common.c (c_common_get_alias_set): Remove special
5603 handling for pointers.
5604
48148244 56052010-08-20 Nathan Froyd <froydnj@codesourcery.com>
5606
5607 * c-common.c: Use FOR_EACH_VEC_ELT.
5608 * c-gimplify.c: Likewise.
5609 * c-pragma.c: Likewise.
5610
89c69892 56112010-08-16 Joseph Myers <joseph@codesourcery.com>
5612
5613 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
5614 RejectDriver.
5615 (MMDX): Change back to MMD. Mark NoDriverArg instead of
5616 RejectDriver.
5617 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
5618 instead of OPT_MDX and OPT_MMDX.
5619
e28aa114 56202010-08-16 Joseph Myers <joseph@codesourcery.com>
5621
5622 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
5623
99b66d21 56242010-08-12 Joseph Myers <joseph@codesourcery.com>
5625
5626 * c.opt (MD, MMD): Change to MDX and MMDX.
5627 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
5628
666f4bf0 56292010-08-11 Joseph Myers <joseph@codesourcery.com>
5630
5631 * c-opts.c (c_common_handle_option): Call handle_generated_option
5632 instead of handle_option.
5633
5ec815f6 56342010-08-08 Nathan Froyd <froydnj@codesourcery.com>
5635
5636 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
5637 (maybe_apply_renaming_pragma): Delete unneeded declarations.
5638
d13143cf 56392010-08-08 Nathan Froyd <froydnj@codesourcery.com>
5640
5641 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
5642 (pending_redefine_extname): Change type to a VEC.
5643 (add_to_renaming_pragma_list): Update for new type of
5644 pending_redefine_extname.
5ec815f6 5645 (maybe_apply_renaming_pragma): Likewise.
d13143cf 5646
2008c983 56472010-08-04 Arnaud Charlet <charlet@adacore.com>
5648
5649 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
5650 visited.
5651 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
5652 decide whether a type has already been declared/seen.
5653 Do not go to the original type.
5654 (dump_nested_types): New parameter forward.
5655 Generate forward declaration if needed and mark type as visited.
5656 (print_ada_declaration): Call dump_nested_types if not already done.
5657 Mark types as visited.
5658
9b091a73 56592010-08-03 Joseph Myers <joseph@codesourcery.com>
5660
5661 * c.opt (-print-pch-checksum): Remove option.
5662 * c-opts.c (c_common_handle_option): Don't handle
5663 OPT_print_pch_checksum.
5664
b78351e5 56652010-07-27 Joseph Myers <joseph@codesourcery.com>
5666
5667 * c-common.h (c_common_handle_option): Update prototype and return
5668 value type.
5669 * c-opts.c (c_common_handle_option): Update prototype and return
5670 value type. Update calls to handle_option and
5671 enable_warning_as_error.
5672
34416a90 56732010-07-27 Jakub Jelinek <jakub@redhat.com>
5674
5675 PR c/45079
5676 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
5677
fecf9011 56782010-07-27 Joseph Myers <joseph@codesourcery.com>
5679
5680 * c-common.h (c_common_missing_argument): Remove.
5681 * c-opts.c (c_common_missing_argument): Remove.
5682 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
5683 idirafter, imacros, include, isysroot, isystem, iquote): Add
5684 MissingArgError.
5685 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
5686
e88d34f6 56872010-07-27 Joseph Myers <joseph@codesourcery.com>
5688
5689 * c-common.h (c_common_option_lang_mask,
5690 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
5691 New.
5692 (c_common_init_options): Update prototype.
5693 * c-opts.c (c_common_option_lang_mask): New.
5694 (c_common_initialize_diagnostics): Split out of
5695 c_common_init_options.
5696 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
5697 New.
5698 (c_common_init_options): Update prototype. Use decoded options in
5699 search for -lang-asm.
5700
1767a056 57012010-07-15 Nathan Froyd <froydnj@codesourcery.com>
5702
5703 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
5704 * c-format.c: Likewise.
5705
0b205f4c 57062010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
5707
5708 * c-common.h: Include diagnostic-core.h. Error if already
5709 included.
5710 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
5711
1c58e3f1 57122010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
5713
1f78217c 5714 * c-common.c (IN_GCC_FRONTEND): Do not undef.
1c58e3f1 5715 Do not include expr.h
5716 (vector_mode_valid_p): Move here.
5717
33cc157c 57182010-06-21 DJ Delorie <dj@redhat.com>
5719
5720 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
5721 allow these pragmas anywhere.
5722
57232010-06-14 Jakub Jelinek <jakub@redhat.com>
5724
5725 PR bootstrap/44509
5726 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
5727 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
5728 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
5729 ggc_strdup instead of xstrdup.
5730
57312010-06-10 Jakub Jelinek <jakub@redhat.com>
5732
5733 * c-cppbuiltin.c: Include cpp-id-data.h.
5734 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
5735 (lazy_hex_fp_value): New function.
5736 (builtin_define_with_hex_fp_value): Provide definitions lazily.
5737
9b40bfbf 57382010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
5739
5740 * c-gimplify.c: Do not include tree-flow.h
5741
202d6e5f 57422010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
5743
5744 PR other/44034
5745 * c-common.c: Rename targetm member:
5746 targetm.enum_va_list -> targetm.enum_va_list_p
5747
d3237426 57482010-06-28 Anatoly Sokolov <aesok@post.ru>
5749
5750 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
5751
596981c8 57522010-06-28 Steven Bosscher <steven@gcc.gnu.org>
5753
5754 * c-cppbuiltin.c: Do not include except.h.
5755
b9bdfa0b 57562010-06-24 Andi Kleen <ak@linux.intel.com>
5757
19931eea 5758 * c-common.c (warn_for_omitted_condop): New.
5759 * c-common.h (warn_for_omitted_condop): Add prototype.
b9bdfa0b 5760
55ad092d 57612010-06-21 Joseph Myers <joseph@codesourcery.com>
5762
5763 * c.opt (lang-objc): Remove.
5764 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
5765
9e7c2572 57662010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
5767
5768 * c-opts.c: Include "tm_p.h".
5769
615ef0bb 57702010-06-20 Joseph Myers <joseph@codesourcery.com>
5771
5772 * c-common.c (parse_optimize_options): Update call to
5773 decode_options.
5774
aef48c9a 57752010-06-18 Nathan Froyd <froydnj@codesourcery.com>
5776
5777 * c-common.c (record_types_used_by_current_var_decl): Adjust for
5778 new type of types_used_by_cur_var_decl.
5779
d74003b4 57802010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
5781
5782 PR bootstrap/44512
5783 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
5784 for C++ standard compliance.
5785
1194d077 57862010-06-16 Jason Merrill <jason@redhat.com>
5787
5788 * c.opt: Add -Wnoexcept.
5789
d473d901 57902010-06-16 Richard Guenther <rguenther@suse.de>
5791
5792 PR c/44555
5793 * c-common.c (c_common_truthvalue_conversion): Remove
5794 premature and wrong optimization concering ADDR_EXPRs.
5795
b62dbfd3 57962010-06-15 Arnaud Charlet <charlet@adacore.com>
5797
5798 * c-ada-spec.c (dump_sloc): Remove column info.
5799 (is_simple_enum): New function.
5800 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
5801 enum types when relevant.
5802
200dd99c 58032010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
5804
19931eea 5805 * c-common.c (conversion_warning): Warn at expression
200dd99c 5806 location.
5807
abf6a617 58082010-06-10 Joseph Myers <joseph@codesourcery.com>
5809
5810 * c-opts.c (c_common_handle_option): Don't handle
5811 OPT_fshow_column.
5812
ba72912a 58132010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
5814
5815 * c-pragma.c (push_alignment): Use typed GC allocation.
5816 (handle_pragma_push_options): Likewise.
5817
5818 * c-common.c (parse_optimize_options): Likewise.
5819
5820 * c-common.h (struct sorted_fields_type): Add variable_size GTY
5821 option.
5822
4aafe913 58232010-06-07 Joseph Myers <joseph@codesourcery.com>
5824
5825 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
5826 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
5827 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
5828 flag_signed_bitfields, warn_strict_null_sentinel,
5829 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
5830 flag_gen_declaration, flag_no_gnu_keywords,
5831 flag_implement_inlines, flag_implicit_templates,
5832 flag_implicit_inline_templates, flag_optional_diags,
5833 flag_elide_constructors, flag_default_inline, flag_rtti,
5834 flag_conserve_space, flag_access_control, flag_check_new,
5835 flag_new_for_scope, flag_weak, flag_working_directory,
5836 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
5837 flag_enforce_eh_specs, flag_threadsafe_statics,
5838 flag_pretty_templates): Remove.
5839 * c-common.h (flag_preprocess_only, flag_nil_receivers,
5840 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
5841 flag_replace_objc_classes, flag_undef, flag_no_builtin,
5842 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
5843 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
5844 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
5845 flag_no_gnu_keywords, flag_implement_inlines,
5846 flag_implicit_templates, flag_implicit_inline_templates,
5847 flag_optional_diags, flag_elide_constructors, flag_default_inline,
5848 flag_rtti, flag_conserve_space, flag_access_control,
5849 flag_check_new, flag_new_for_scope, flag_weak,
5850 flag_working_directory, flag_use_cxa_atexit,
5851 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
5852 flag_threadsafe_statics, flag_pretty_templates,
5853 warn_strict_null_sentinel): Remove.
5854 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
5855 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
5856 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
5857 fimplicit-inline-templates, fimplicit-templates,
5858 flax-vector-conversions, fms-extensions, fnil-receivers,
5859 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
5860 frtti, fshort-double, fshort-enums, fshort-wchar,
5861 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
5862 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
5863 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
5864 gen-decls, undef): Use Var.
5865 (fdefault-inline, foptional-diags): Document as doing nothing.
5866 * c-opts.c (c_common_handle_option): Remove cases for options now
5867 using Var. Mark ignored options as such.
5868
7bedc3a0 58692010-06-05 Steven Bosscher <steven@gcc.gnu.org>
5870
19931eea 5871 * c-common.c: Moved to here from parent directory.
7bedc3a0 5872 * c-common.def: Likewise.
5873 * c-common.h: Likewise.
5874 * c-cppbuiltin.c: Likewise.
5875 * c-dump.c: Likewise.
5876 * c-format.c: Likewise.
5877 * c-format.h : Likewise.
5878 * c-gimplify.c: Likewise.
5879 * c-lex.c: Likewise.
5880 * c-omp.c: Likewise.
5881 * c.opt: Likewise.
5882 * c-opts.c: Likewise.
5883 * c-pch.c: Likewise.
5884 * c-ppoutput.c: Likewise.
5885 * c-pragma.c: Likewise.
5886 * c-pragma.h: Likewise.
5887 * c-pretty-print.c: Likewise.
5888 * c-pretty-print.h: Likewise.
5889 * c-semantics.c: Likewise.
5890 * stub-objc.c: Likewise.
5891
5892 * c-common.c: Include gt-c-family-c-common.h.
5893 * c-pragma.c: Include gt-c-family-c-pragma.h.
5894\f
d353bf18 5895Copyright (C) 2010-2015 Free Software Foundation, Inc.
7bedc3a0 5896
5897Copying and distribution of this file, with or without modification,
5898are permitted in any medium without royalty provided the copyright
5899notice and this notice are preserved.